Home
last modified time | relevance | path

Searched refs:tz (Results 1 – 21 of 21) sorted by relevance

/drivers/acpi/
Dthermal.c199 static int acpi_thermal_get_temperature(struct acpi_thermal *tz) in acpi_thermal_get_temperature() argument
204 if (!tz) in acpi_thermal_get_temperature()
207 tz->last_temperature = tz->temperature; in acpi_thermal_get_temperature()
209 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); in acpi_thermal_get_temperature()
213 tz->temperature = tmp; in acpi_thermal_get_temperature()
215 tz->temperature)); in acpi_thermal_get_temperature()
220 static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) in acpi_thermal_get_polling_frequency() argument
225 if (!tz) in acpi_thermal_get_polling_frequency()
228 status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp); in acpi_thermal_get_polling_frequency()
232 tz->polling_frequency = tmp; in acpi_thermal_get_polling_frequency()
[all …]
/drivers/thermal/
Dthermal_core.c89 static void bind_previous_governor(struct thermal_zone_device *tz, in bind_previous_governor() argument
92 if (tz->governor && tz->governor->bind_to_tz) { in bind_previous_governor()
93 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor()
94 dev_err(&tz->device, in bind_previous_governor()
96 failed_gov_name, tz->governor->name, tz->type); in bind_previous_governor()
97 tz->governor = NULL; in bind_previous_governor()
111 static int thermal_set_governor(struct thermal_zone_device *tz, in thermal_set_governor() argument
116 if (tz->governor && tz->governor->unbind_from_tz) in thermal_set_governor()
117 tz->governor->unbind_from_tz(tz); in thermal_set_governor()
120 ret = new_gov->bind_to_tz(tz); in thermal_set_governor()
[all …]
Dpower_allocator.c93 static u32 estimate_sustainable_power(struct thermal_zone_device *tz) in estimate_sustainable_power() argument
97 struct power_allocator_params *params = tz->governor_data; in estimate_sustainable_power()
99 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in estimate_sustainable_power()
106 if (power_actor_get_min_power(cdev, tz, &min_power)) in estimate_sustainable_power()
134 static void estimate_pid_constants(struct thermal_zone_device *tz, in estimate_pid_constants() argument
142 ret = tz->ops->get_trip_temp(tz, trip_switch_on, &switch_on_temp); in estimate_pid_constants()
158 if (!tz->tzp->k_po || force) in estimate_pid_constants()
159 tz->tzp->k_po = int_to_frac(sustainable_power) / in estimate_pid_constants()
162 if (!tz->tzp->k_pu || force) in estimate_pid_constants()
163 tz->tzp->k_pu = int_to_frac(2 * sustainable_power) / in estimate_pid_constants()
[all …]
Dof-thermal.c93 static int of_thermal_get_temp(struct thermal_zone_device *tz, in of_thermal_get_temp() argument
96 struct __thermal_zone *data = tz->devdata; in of_thermal_get_temp()
114 int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument
116 struct __thermal_zone *data = tz->devdata; in of_thermal_get_ntrips()
135 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument
137 struct __thermal_zone *data = tz->devdata; in of_thermal_is_trip_valid()
157 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument
159 struct __thermal_zone *data = tz->devdata; in of_thermal_get_trip_points()
179 static int of_thermal_set_emul_temp(struct thermal_zone_device *tz, in of_thermal_set_emul_temp() argument
182 struct __thermal_zone *data = tz->devdata; in of_thermal_set_emul_temp()
[all …]
Dfair_share.c34 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument
40 if (tz->trips == 0 || !tz->ops->get_trip_temp) in get_trip_level()
43 for (count = 0; count < tz->trips; count++) { in get_trip_level()
44 tz->ops->get_trip_temp(tz, count, &trip_temp); in get_trip_level()
45 if (tz->temperature < trip_temp) in get_trip_level()
54 tz->ops->get_trip_type(tz, count - 1, &trip_type); in get_trip_level()
55 trace_thermal_zone_trip(tz, count - 1, trip_type); in get_trip_level()
61 static long get_target_state(struct thermal_zone_device *tz, in get_target_state() argument
68 return (long)(percentage * level * max_state) / (100 * tz->trips); in get_target_state()
89 static int fair_share_throttle(struct thermal_zone_device *tz, int trip) in fair_share_throttle() argument
[all …]
Dstep_wise.c117 static void update_passive_instance(struct thermal_zone_device *tz, in update_passive_instance() argument
125 tz->passive += value; in update_passive_instance()
128 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument
138 trip_temp = tz->forced_passive; in thermal_zone_trip_update()
141 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update()
142 tz->ops->get_trip_type(tz, trip, &trip_type); in thermal_zone_trip_update()
145 trend = get_tz_trend(tz, trip); in thermal_zone_trip_update()
147 if (tz->temperature >= trip_temp) { in thermal_zone_trip_update()
149 trace_thermal_zone_trip(tz, trip, trip_type); in thermal_zone_trip_update()
152 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", in thermal_zone_trip_update()
[all …]
Dgov_bang_bang.c26 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument
31 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update()
32 tz->ops->get_trip_hyst(tz, trip, &trip_hyst); in thermal_zone_trip_update()
34 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in thermal_zone_trip_update()
35 trip, trip_temp, tz->temperature, in thermal_zone_trip_update()
38 mutex_lock(&tz->lock); in thermal_zone_trip_update()
40 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update()
59 if (instance->target == 0 && tz->temperature >= trip_temp) in thermal_zone_trip_update()
62 tz->temperature < trip_temp - trip_hyst) in thermal_zone_trip_update()
71 mutex_unlock(&tz->lock); in thermal_zone_trip_update()
[all …]
Dthermal_hwmon.c52 struct thermal_zone_device *tz; member
79 struct thermal_zone_device *tz = temp->tz; in temp_input_show() local
81 ret = thermal_zone_get_temp(tz, &temperature); in temp_input_show()
97 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local
101 ret = tz->ops->get_crit_temp(tz, &temperature); in temp_crit_show()
110 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) in thermal_hwmon_lookup_by_type() argument
116 if (!strcmp(hwmon->type, tz->type)) { in thermal_hwmon_lookup_by_type()
128 const struct thermal_zone_device *tz) in thermal_hwmon_lookup_temp() argument
134 if (temp->tz == tz) { in thermal_hwmon_lookup_temp()
143 static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz) in thermal_zone_crit_temp_valid() argument
[all …]
Dimx_thermal.c91 struct thermal_zone_device *tz; member
133 static int imx_get_temp(struct thermal_zone_device *tz, int *temp) in imx_get_temp() argument
135 struct imx_thermal_data *data = tz->devdata; in imx_get_temp()
172 dev_dbg(&tz->device, "temp measurement never finished\n"); in imx_get_temp()
189 dev_dbg(&tz->device, "thermal alarm off: T < %d\n", in imx_get_temp()
195 dev_dbg(&tz->device, "millicelsius: %d\n", *temp); in imx_get_temp()
208 static int imx_get_mode(struct thermal_zone_device *tz, in imx_get_mode() argument
211 struct imx_thermal_data *data = tz->devdata; in imx_get_mode()
218 static int imx_set_mode(struct thermal_zone_device *tz, in imx_set_mode() argument
221 struct imx_thermal_data *data = tz->devdata; in imx_set_mode()
[all …]
Dthermal_hwmon.h34 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
35 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
38 thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_add_hwmon_sysfs() argument
44 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_remove_hwmon_sysfs() argument
Duser_space.c35 static int notify_user_space(struct thermal_zone_device *tz, int trip) in notify_user_space() argument
37 mutex_lock(&tz->lock); in notify_user_space()
38 kobject_uevent(&tz->device.kobj, KOBJ_CHANGE); in notify_user_space()
39 mutex_unlock(&tz->lock); in notify_user_space()
Dthermal_core.h41 struct thermal_zone_device *tz; member
111 static inline int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument
115 static inline bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, in of_thermal_is_trip_valid() argument
121 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument
Dcpu_cooling.c424 struct thermal_zone_device *tz, unsigned long freq, in get_static_power() argument
453 return cpufreq_device->plat_get_static_power(cpumask, tz->passive_delay, in get_static_power()
573 struct thermal_zone_device *tz, in cpufreq_get_requested_power() argument
619 ret = get_static_power(cpufreq_device, tz, freq, &static_power); in cpufreq_get_requested_power()
653 struct thermal_zone_device *tz, in cpufreq_state2power() argument
676 ret = get_static_power(cpufreq_device, tz, freq, &static_power); in cpufreq_state2power()
705 struct thermal_zone_device *tz, u32 power, in cpufreq_power2state() argument
721 ret = get_static_power(cpufreq_device, tz, cur_freq, &static_power); in cpufreq_power2state()
Dtegra_soctherm.c345 struct thermal_zone_device *tz; in tegra_soctherm_probe() local
422 tz = thermal_zone_of_sensor_register(&pdev->dev, i, zone, in tegra_soctherm_probe()
424 if (IS_ERR(tz)) { in tegra_soctherm_probe()
425 err = PTR_ERR(tz); in tegra_soctherm_probe()
431 tegra->thermctl_tzs[i] = tz; in tegra_soctherm_probe()
Ddevfreq_cooling.c275 struct thermal_zone_device *tz, in devfreq_cooling_get_requested_power() argument
307 struct thermal_zone_device *tz, in devfreq_cooling_state2power() argument
326 struct thermal_zone_device *tz, in devfreq_cooling_power2state() argument
/drivers/thermal/samsung/
Dexynos_tmu.c217 struct thermal_zone_device *tz = p->tzd; in exynos_report_trigger() local
221 if (!tz) { in exynos_report_trigger()
226 thermal_zone_device_update(tz); in exynos_report_trigger()
228 mutex_lock(&tz->lock); in exynos_report_trigger()
230 for (i = 0; i < of_thermal_get_ntrips(tz); i++) { in exynos_report_trigger()
231 tz->ops->get_trip_temp(tz, i, &temp); in exynos_report_trigger()
232 if (tz->last_temperature < temp) in exynos_report_trigger()
237 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, envp); in exynos_report_trigger()
238 mutex_unlock(&tz->lock); in exynos_report_trigger()
316 struct thermal_zone_device *tz = data->tzd; in get_th_reg() local
[all …]
/drivers/hwmon/
Dtmp102.c56 struct thermal_zone_device *tz; member
235 tmp102->tz = thermal_zone_of_sensor_register(hwmon_dev, 0, hwmon_dev, in tmp102_probe()
237 if (IS_ERR(tmp102->tz)) in tmp102_probe()
238 tmp102->tz = NULL; in tmp102_probe()
254 thermal_zone_of_sensor_unregister(tmp102->hwmon_dev, tmp102->tz); in tmp102_remove()
Dlm75.c80 struct thermal_zone_device *tz; member
309 data->tz = thermal_zone_of_sensor_register(data->hwmon_dev, 0, in lm75_probe()
312 if (IS_ERR(data->tz)) in lm75_probe()
313 data->tz = NULL; in lm75_probe()
325 thermal_zone_of_sensor_unregister(data->hwmon_dev, data->tz); in lm75_remove()
Dntc_thermistor.c224 struct thermal_zone_device *tz; member
636 data->tz = thermal_zone_of_sensor_register(data->dev, 0, data->dev, in ntc_thermistor_probe()
638 if (IS_ERR(data->tz)) { in ntc_thermistor_probe()
640 data->tz = NULL; in ntc_thermistor_probe()
659 thermal_zone_of_sensor_unregister(data->dev, data->tz); in ntc_thermistor_remove()
/drivers/input/touchscreen/
Dsun4i-ts.c118 struct thermal_zone_device *tz; member
369 ts->tz = thermal_zone_of_sensor_register(ts->dev, 0, ts, in sun4i_ts_probe()
371 if (IS_ERR(ts->tz)) in sun4i_ts_probe()
372 ts->tz = NULL; in sun4i_ts_probe()
380 thermal_zone_of_sensor_unregister(ts->dev, ts->tz); in sun4i_ts_probe()
397 thermal_zone_of_sensor_unregister(ts->dev, ts->tz); in sun4i_ts_remove()
/drivers/staging/comedi/drivers/
Djr3_pci.h248 tz, enumerator