Home
last modified time | relevance | path

Searched refs:tz (Results 1 - 25 of 200) sorted by relevance

12345678

/kernel/linux/linux-6.6/drivers/acpi/
H A Dthermal.c65 #define ACPI_THERMAL_TRIPS_EXCEPTION(flags, tz, str) \
68 acpi_handle_info(tz->device->handle, \
141 static int acpi_thermal_get_temperature(struct acpi_thermal *tz) in acpi_thermal_get_temperature() argument
146 if (!tz) in acpi_thermal_get_temperature()
149 tz->last_temperature = tz->temperature; in acpi_thermal_get_temperature()
151 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); in acpi_thermal_get_temperature()
155 tz->temperature = tmp; in acpi_thermal_get_temperature()
157 acpi_handle_debug(tz->device->handle, "Temperature is %lu dK\n", in acpi_thermal_get_temperature()
158 tz in acpi_thermal_get_temperature()
163 acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) acpi_thermal_get_polling_frequency() argument
182 acpi_thermal_temp(struct acpi_thermal *tz, int temp_deci_k) acpi_thermal_temp() argument
191 __acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) __acpi_thermal_trips_update() argument
405 struct acpi_thermal *tz = data; acpi_thermal_adjust_trip() local
421 struct acpi_thermal *tz = thermal_zone_device_priv(thermal); acpi_thermal_adjust_thermal_zone() local
430 acpi_queue_thermal_check(struct acpi_thermal *tz) acpi_queue_thermal_check() argument
436 acpi_thermal_trips_update(struct acpi_thermal *tz, u32 event) acpi_thermal_trips_update() argument
454 acpi_thermal_get_trip_points(struct acpi_thermal *tz) acpi_thermal_get_trip_points() argument
479 struct acpi_thermal *tz = thermal_zone_device_priv(thermal); thermal_get_temp() local
498 struct acpi_thermal *tz = thermal_zone_device_priv(thermal); thermal_get_trend() local
542 struct acpi_thermal *tz = thermal_zone_device_priv(thermal); acpi_thermal_zone_device_hot() local
551 struct acpi_thermal *tz = thermal_zone_device_priv(thermal); acpi_thermal_zone_device_critical() local
565 struct acpi_thermal *tz = thermal_zone_device_priv(thermal); acpi_thermal_cooling_device_cb() local
656 acpi_thermal_zone_sysfs_add(struct acpi_thermal *tz) acpi_thermal_zone_sysfs_add() argument
674 acpi_thermal_zone_sysfs_remove(struct acpi_thermal *tz) acpi_thermal_zone_sysfs_remove() argument
682 acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) acpi_thermal_register_thermal_zone() argument
779 acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz) acpi_thermal_unregister_thermal_zone() argument
795 struct acpi_thermal *tz = acpi_driver_data(device); acpi_thermal_notify() local
827 acpi_thermal_aml_dependency_fix(struct acpi_thermal *tz) acpi_thermal_aml_dependency_fix() argument
847 acpi_thermal_get_info(struct acpi_thermal *tz) acpi_thermal_get_info() argument
889 acpi_thermal_guess_offset(struct acpi_thermal *tz) acpi_thermal_guess_offset() argument
900 struct acpi_thermal *tz = container_of(work, struct acpi_thermal, acpi_thermal_check_fn() local
925 struct acpi_thermal *tz; acpi_thermal_add() local
976 struct acpi_thermal *tz; acpi_thermal_remove() local
1002 struct acpi_thermal *tz; acpi_thermal_resume() local
[all...]
/kernel/linux/linux-5.10/drivers/thermal/
H A Dthermal_core.c69 * @tz: a valid pointer to a struct thermal_zone_device
75 static void bind_previous_governor(struct thermal_zone_device *tz, in bind_previous_governor() argument
78 if (tz->governor && tz->governor->bind_to_tz) { in bind_previous_governor()
79 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor()
80 dev_err(&tz->device, in bind_previous_governor()
82 failed_gov_name, tz->governor->name, tz->type); in bind_previous_governor()
83 tz in bind_previous_governor()
97 thermal_set_governor(struct thermal_zone_device *tz, struct thermal_governor *new_gov) thermal_set_governor() argument
199 thermal_zone_device_set_policy(struct thermal_zone_device *tz, char *policy) thermal_zone_device_set_policy() argument
290 thermal_zone_device_set_polling(struct thermal_zone_device *tz, int delay) thermal_zone_device_set_polling() argument
305 should_stop_polling(struct thermal_zone_device *tz) should_stop_polling() argument
310 monitor_thermal_zone(struct thermal_zone_device *tz) monitor_thermal_zone() argument
328 handle_non_critical_trips(struct thermal_zone_device *tz, int trip) handle_non_critical_trips() argument
382 handle_critical_trips(struct thermal_zone_device *tz, int trip, enum thermal_trip_type trip_type) handle_critical_trips() argument
416 handle_thermal_trip(struct thermal_zone_device *tz, int trip) handle_thermal_trip() argument
450 update_temperature(struct thermal_zone_device *tz) update_temperature() argument
473 thermal_zone_device_init(struct thermal_zone_device *tz) thermal_zone_device_init() argument
483 thermal_zone_device_reset(struct thermal_zone_device *tz) thermal_zone_device_reset() argument
489 thermal_zone_device_set_mode(struct thermal_zone_device *tz, enum thermal_device_mode mode) thermal_zone_device_set_mode() argument
521 thermal_zone_device_enable(struct thermal_zone_device *tz) thermal_zone_device_enable() argument
527 thermal_zone_device_disable(struct thermal_zone_device *tz) thermal_zone_device_disable() argument
533 thermal_zone_device_is_enabled(struct thermal_zone_device *tz) thermal_zone_device_is_enabled() argument
546 thermal_zone_device_update(struct thermal_zone_device *tz, enum thermal_notify_event event) thermal_zone_device_update() argument
583 thermal_notify_framework(struct thermal_zone_device *tz, int trip) thermal_notify_framework() argument
591 struct thermal_zone_device *tz = container_of(work, struct thermal_zone_device_check() local
685 thermal_zone_device_rebind_exception(struct thermal_zone_device *tz, const char *cdev_type, size_t size) thermal_zone_device_rebind_exception() argument
742 struct thermal_zone_device *tz; for_each_thermal_zone() local
758 struct thermal_zone_device *tz, *match = NULL; thermal_zone_get_by_id() local
772 thermal_zone_device_unbind_exception(struct thermal_zone_device *tz, const char *cdev_type, size_t size) thermal_zone_device_unbind_exception() argument
821 thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, int trip, struct thermal_cooling_device *cdev, unsigned long upper, unsigned long lower, unsigned int weight) thermal_zone_bind_cooling_device() argument
948 thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, int trip, struct thermal_cooling_device *cdev) thermal_zone_unbind_cooling_device() argument
982 struct thermal_zone_device *tz; thermal_release() local
1003 print_bind_err_msg(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, int ret) print_bind_err_msg() argument
1010 __bind(struct thermal_zone_device *tz, int mask, struct thermal_cooling_device *cdev, unsigned long *limits, unsigned int weight) __bind() argument
1255 __unbind(struct thermal_zone_device *tz, int mask, struct thermal_cooling_device *cdev) __unbind() argument
1276 struct thermal_zone_device *tz; thermal_cooling_device_unregister() local
1322 bind_tz(struct thermal_zone_device *tz) bind_tz() argument
1392 struct thermal_zone_device *tz; thermal_zone_device_register() local
1528 thermal_zone_device_unregister(struct thermal_zone_device *tz) thermal_zone_device_unregister() argument
1627 struct thermal_zone_device *tz; thermal_pm_notify() local
[all...]
H A Dthermal_helpers.c26 int get_tz_trend(struct thermal_zone_device *tz, int trip) in get_tz_trend() argument
30 if (tz->emul_temperature || !tz->ops->get_trend || in get_tz_trend()
31 tz->ops->get_trend(tz, trip, &trend)) { in get_tz_trend()
32 if (tz->temperature > tz->last_temperature) in get_tz_trend()
34 else if (tz->temperature < tz->last_temperature) in get_tz_trend()
45 get_thermal_instance(struct thermal_zone_device *tz, in get_thermal_instance() argument
78 thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) thermal_zone_get_temp() argument
129 thermal_zone_set_trips(struct thermal_zone_device *tz) thermal_zone_set_trips() argument
226 thermal_zone_get_slope(struct thermal_zone_device *tz) thermal_zone_get_slope() argument
241 thermal_zone_get_offset(struct thermal_zone_device *tz) thermal_zone_get_offset() argument
[all...]
H A Dthermal_sysfs.c29 struct thermal_zone_device *tz = to_thermal_zone(dev); in type_show() local
31 return sprintf(buf, "%s\n", tz->type); in type_show()
37 struct thermal_zone_device *tz = to_thermal_zone(dev); in temp_show() local
40 ret = thermal_zone_get_temp(tz, &temperature); in temp_show()
51 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_show() local
52 int enabled = thermal_zone_device_is_enabled(tz); in mode_show()
61 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_store() local
65 result = thermal_zone_device_enable(tz); in mode_store()
67 result = thermal_zone_device_disable(tz); in mode_store()
81 struct thermal_zone_device *tz in trip_point_type_show() local
113 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_temp_store() local
152 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_temp_show() local
174 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_hyst_store() local
204 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_hyst_show() local
223 struct thermal_zone_device *tz = to_thermal_zone(dev); passive_store() local
257 struct thermal_zone_device *tz = to_thermal_zone(dev); passive_show() local
266 struct thermal_zone_device *tz = to_thermal_zone(dev); policy_store() local
282 struct thermal_zone_device *tz = to_thermal_zone(dev); policy_show() local
299 struct thermal_zone_device *tz = to_thermal_zone(dev); emul_temp_store() local
326 struct thermal_zone_device *tz = to_thermal_zone(dev); sustainable_power_show() local
338 struct thermal_zone_device *tz = to_thermal_zone(dev); sustainable_power_store() local
452 struct thermal_zone_device *tz; thermal_zone_passive_is_visible() local
493 create_trip_attrs(struct thermal_zone_device *tz, int mask) create_trip_attrs() argument
595 destroy_trip_attrs(struct thermal_zone_device *tz) destroy_trip_attrs() argument
607 thermal_zone_create_device_groups(struct thermal_zone_device *tz, int mask) thermal_zone_create_device_groups() argument
639 thermal_zone_destroy_device_groups(struct thermal_zone_device *tz) thermal_zone_destroy_device_groups() argument
[all...]
H A Dgov_power_allocator.c77 * @tz: thermal zone we are operating in
86 static u32 estimate_sustainable_power(struct thermal_zone_device *tz) in estimate_sustainable_power() argument
90 struct power_allocator_params *params = tz->governor_data; in estimate_sustainable_power()
92 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in estimate_sustainable_power()
110 * @tz: thermal zone for which to estimate the constants
127 static void estimate_pid_constants(struct thermal_zone_device *tz, in estimate_pid_constants() argument
135 ret = tz->ops->get_trip_temp(tz, trip_switch_on, &switch_on_temp); in estimate_pid_constants()
151 if (!tz->tzp->k_po || force) in estimate_pid_constants()
152 tz in estimate_pid_constants()
185 pid_controller(struct thermal_zone_device *tz, int control_temp, u32 max_allocatable_power) pid_controller() argument
325 allocate_power(struct thermal_zone_device *tz, int control_temp) allocate_power() argument
461 get_governor_trips(struct thermal_zone_device *tz, struct power_allocator_params *params) get_governor_trips() argument
514 allow_maximum_power(struct thermal_zone_device *tz) allow_maximum_power() argument
543 power_allocator_bind(struct thermal_zone_device *tz) power_allocator_bind() argument
590 power_allocator_unbind(struct thermal_zone_device *tz) power_allocator_unbind() argument
605 power_allocator_throttle(struct thermal_zone_device *tz, int trip) power_allocator_throttle() argument
[all...]
H A Dthermal_of.c87 static int of_thermal_get_temp(struct thermal_zone_device *tz, in of_thermal_get_temp() argument
90 struct __thermal_zone *data = tz->devdata; in of_thermal_get_temp()
98 static int of_thermal_set_trips(struct thermal_zone_device *tz, in of_thermal_set_trips() argument
101 struct __thermal_zone *data = tz->devdata; in of_thermal_set_trips()
112 * @tz: pointer to a thermal zone
119 int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument
121 struct __thermal_zone *data = tz->devdata; in of_thermal_get_ntrips()
133 * @tz: pointer to a thermal zone
140 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument
142 struct __thermal_zone *data = tz in of_thermal_is_trip_valid()
162 of_thermal_get_trip_points(struct thermal_zone_device *tz) of_thermal_get_trip_points() argument
184 of_thermal_set_emul_temp(struct thermal_zone_device *tz, int temp) of_thermal_set_emul_temp() argument
195 of_thermal_get_trend(struct thermal_zone_device *tz, int trip, enum thermal_trend *trend) of_thermal_get_trend() argument
273 of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, enum thermal_trip_type *type) of_thermal_get_trip_type() argument
286 of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, int *temp) of_thermal_get_trip_temp() argument
299 of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip, int temp) of_thermal_set_trip_temp() argument
321 of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip, int *hyst) of_thermal_get_trip_hyst() argument
334 of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, int hyst) of_thermal_set_trip_hyst() argument
348 of_thermal_get_crit_temp(struct thermal_zone_device *tz, int *temp) of_thermal_get_crit_temp() argument
383 struct __thermal_zone *tz; thermal_zone_of_add_sensor() local
554 struct __thermal_zone *tz; thermal_zone_of_sensor_unregister() local
859 struct __thermal_zone *tz; thermal_of_build_thermal_zone() local
980 of_thermal_free_zone(struct __thermal_zone *tz) of_thermal_free_zone() argument
1048 struct __thermal_zone *tz; of_parse_thermal_zones() local
[all...]
H A Dgov_fair_share.c20 * @tz: thermal zone device
22 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument
28 if (tz->trips == 0 || !tz->ops->get_trip_temp) in get_trip_level()
31 for (count = 0; count < tz->trips; count++) { in get_trip_level()
32 tz->ops->get_trip_temp(tz, count, &trip_temp); in get_trip_level()
33 if (tz->temperature < trip_temp) in get_trip_level()
42 tz->ops->get_trip_type(tz, coun in get_trip_level()
49 get_target_state(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, int percentage, int level) get_target_state() argument
78 fair_share_throttle(struct thermal_zone_device *tz, int trip) fair_share_throttle() argument
[all...]
H A Dgov_bang_bang.c16 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument
21 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update()
23 if (!tz->ops->get_trip_hyst) { in thermal_zone_trip_update()
25 "running with default hysteresis zero\n", tz->type); in thermal_zone_trip_update()
28 tz->ops->get_trip_hyst(tz, trip, &trip_hyst); in thermal_zone_trip_update()
30 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in thermal_zone_trip_update()
31 trip, trip_temp, tz->temperature, in thermal_zone_trip_update()
34 mutex_lock(&tz in thermal_zone_trip_update()
99 bang_bang_control(struct thermal_zone_device *tz, int trip) bang_bang_control() argument
[all...]
H A Dgov_step_wise.c105 static void update_passive_instance(struct thermal_zone_device *tz, in update_passive_instance() argument
113 tz->passive += value; in update_passive_instance()
116 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument
126 trip_temp = tz->forced_passive; in thermal_zone_trip_update()
129 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update()
130 tz->ops->get_trip_type(tz, trip, &trip_type); in thermal_zone_trip_update()
133 trend = get_tz_trend(tz, trip); in thermal_zone_trip_update()
135 if (tz in thermal_zone_trip_update()
186 step_wise_throttle(struct thermal_zone_device *tz, int trip) step_wise_throttle() argument
[all...]
H A Dthermal_hwmon.c39 struct thermal_zone_device *tz; member
58 struct thermal_zone_device *tz = temp->tz; in temp_input_show() local
60 ret = thermal_zone_get_temp(tz, &temperature); in temp_input_show()
76 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local
80 ret = tz->ops->get_crit_temp(tz, &temperature); in temp_crit_show()
89 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) in thermal_hwmon_lookup_by_type() argument
96 strcpy(type, tz in thermal_hwmon_lookup_by_type()
110 thermal_hwmon_lookup_temp(const struct thermal_hwmon_device *hwmon, const struct thermal_zone_device *tz) thermal_hwmon_lookup_temp() argument
126 thermal_zone_crit_temp_valid(struct thermal_zone_device *tz) thermal_zone_crit_temp_valid() argument
132 thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) thermal_add_hwmon_sysfs() argument
216 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) thermal_remove_hwmon_sysfs() argument
259 devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) devm_thermal_add_hwmon_sysfs() argument
[all...]
/kernel/linux/linux-6.6/drivers/thermal/
H A Dthermal_core.c65 * @tz: a valid pointer to a struct thermal_zone_device
71 static void bind_previous_governor(struct thermal_zone_device *tz, in bind_previous_governor() argument
74 if (tz->governor && tz->governor->bind_to_tz) { in bind_previous_governor()
75 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor()
76 dev_err(&tz->device, in bind_previous_governor()
78 failed_gov_name, tz->governor->name, tz->type); in bind_previous_governor()
79 tz in bind_previous_governor()
93 thermal_set_governor(struct thermal_zone_device *tz, struct thermal_governor *new_gov) thermal_set_governor() argument
195 thermal_zone_device_set_policy(struct thermal_zone_device *tz, char *policy) thermal_zone_device_set_policy() argument
288 thermal_zone_device_set_polling(struct thermal_zone_device *tz, unsigned long delay) thermal_zone_device_set_polling() argument
298 monitor_thermal_zone(struct thermal_zone_device *tz) monitor_thermal_zone() argument
308 handle_non_critical_trips(struct thermal_zone_device *tz, int trip) handle_non_critical_trips() argument
314 thermal_zone_device_critical(struct thermal_zone_device *tz) thermal_zone_device_critical() argument
329 handle_critical_trips(struct thermal_zone_device *tz, int trip, int trip_temp, enum thermal_trip_type trip_type) handle_critical_trips() argument
344 handle_thermal_trip(struct thermal_zone_device *tz, int trip_id) handle_thermal_trip() argument
374 update_temperature(struct thermal_zone_device *tz) update_temperature() argument
395 thermal_zone_device_init(struct thermal_zone_device *tz) thermal_zone_device_init() argument
405 __thermal_zone_device_update(struct thermal_zone_device *tz, enum thermal_notify_event event) __thermal_zone_device_update() argument
433 thermal_zone_device_set_mode(struct thermal_zone_device *tz, enum thermal_device_mode mode) thermal_zone_device_set_mode() argument
471 thermal_zone_device_enable(struct thermal_zone_device *tz) thermal_zone_device_enable() argument
477 thermal_zone_device_disable(struct thermal_zone_device *tz) thermal_zone_device_disable() argument
483 thermal_zone_device_is_enabled(struct thermal_zone_device *tz) thermal_zone_device_is_enabled() argument
490 thermal_zone_device_update(struct thermal_zone_device *tz, enum thermal_notify_event event) thermal_zone_device_update() argument
506 thermal_zone_device_exec(struct thermal_zone_device *tz, void (*cb)(struct thermal_zone_device *, unsigned long), unsigned long data) thermal_zone_device_exec() argument
521 struct thermal_zone_device *tz = container_of(work, struct thermal_zone_device_check() local
564 struct thermal_zone_device *tz; for_each_thermal_zone() local
580 struct thermal_zone_device *tz, *match = NULL; thermal_zone_get_by_id() local
626 thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, int trip_index, struct thermal_cooling_device *cdev, unsigned long upper, unsigned long lower, unsigned int weight) thermal_zone_bind_cooling_device() argument
759 thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, int trip_index, struct thermal_cooling_device *cdev) thermal_zone_unbind_cooling_device() argument
795 struct thermal_zone_device *tz; thermal_release() local
817 print_bind_err_msg(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, int ret) print_bind_err_msg() argument
1127 struct thermal_zone_device *tz; thermal_cooling_device_unregister() local
1153 bind_tz(struct thermal_zone_device *tz) bind_tz() argument
1179 thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp) thermal_zone_get_crit_temp() argument
1236 struct thermal_zone_device *tz; thermal_zone_device_register_with_trips() local
1437 thermal_zone_device_unregister(struct thermal_zone_device *tz) thermal_zone_device_unregister() argument
1527 struct thermal_zone_device *tz; thermal_pm_notify() local
[all...]
H A Dthermal_trip.c12 int for_each_thermal_trip(struct thermal_zone_device *tz, in for_each_thermal_trip() argument
18 lockdep_assert_held(&tz->lock); in for_each_thermal_trip()
20 for (i = 0; i < tz->num_trips; i++) { in for_each_thermal_trip()
21 ret = cb(&tz->trips[i], data); in for_each_thermal_trip()
30 int thermal_zone_get_num_trips(struct thermal_zone_device *tz) in thermal_zone_get_num_trips() argument
32 return tz->num_trips; in thermal_zone_get_num_trips()
38 * @tz: a pointer to a thermal zone device structure
46 * This function must be called with tz->lock held. Both tz and tz
51 __thermal_zone_set_trips(struct thermal_zone_device *tz) __thermal_zone_set_trips() argument
113 __thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id, struct thermal_trip *trip) __thermal_zone_get_trip() argument
124 thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id, struct thermal_trip *trip) thermal_zone_get_trip() argument
137 thermal_zone_set_trip(struct thermal_zone_device *tz, int trip_id, const struct thermal_trip *trip) thermal_zone_set_trip() argument
176 thermal_zone_trip_id(struct thermal_zone_device *tz, const struct thermal_trip *trip) thermal_zone_trip_id() argument
[all...]
H A Dthermal_helpers.c25 int get_tz_trend(struct thermal_zone_device *tz, int trip_index) in get_tz_trend() argument
27 struct thermal_trip *trip = tz->trips ? &tz->trips[trip_index] : NULL; in get_tz_trend()
30 if (tz->emul_temperature || !tz->ops->get_trend || in get_tz_trend()
31 tz->ops->get_trend(tz, trip, &trend)) { in get_tz_trend()
32 if (tz->temperature > tz->last_temperature) in get_tz_trend()
34 else if (tz in get_tz_trend()
44 get_thermal_instance(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, int trip_index) get_thermal_instance() argument
84 __thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) __thermal_zone_get_temp() argument
129 thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) thermal_zone_get_temp() argument
209 thermal_zone_get_slope(struct thermal_zone_device *tz) thermal_zone_get_slope() argument
224 thermal_zone_get_offset(struct thermal_zone_device *tz) thermal_zone_get_offset() argument
[all...]
H A Dgov_power_allocator.c79 * @tz: thermal zone we are operating in
88 static u32 estimate_sustainable_power(struct thermal_zone_device *tz) in estimate_sustainable_power() argument
92 struct power_allocator_params *params = tz->governor_data; in estimate_sustainable_power()
94 &tz->trips[params->trip_max_desired_temperature]; in estimate_sustainable_power()
96 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in estimate_sustainable_power()
117 * @tz: thermal zone for which to estimate the constants
125 static void estimate_pid_constants(struct thermal_zone_device *tz, in estimate_pid_constants() argument
134 ret = __thermal_zone_get_trip(tz, trip_switch_on, &trip); in estimate_pid_constants()
149 tz->tzp->k_po = int_to_frac(sustainable_power) / in estimate_pid_constants()
152 tz in estimate_pid_constants()
175 get_sustainable_power(struct thermal_zone_device *tz, struct power_allocator_params *params, int control_temp) get_sustainable_power() argument
217 pid_controller(struct thermal_zone_device *tz, int control_temp, u32 max_allocatable_power) pid_controller() argument
383 allocate_power(struct thermal_zone_device *tz, int control_temp) allocate_power() argument
513 get_governor_trips(struct thermal_zone_device *tz, struct power_allocator_params *params) get_governor_trips() argument
566 allow_maximum_power(struct thermal_zone_device *tz, bool update) allow_maximum_power() argument
609 check_power_actors(struct thermal_zone_device *tz) check_power_actors() argument
635 power_allocator_bind(struct thermal_zone_device *tz) power_allocator_bind() argument
685 power_allocator_unbind(struct thermal_zone_device *tz) power_allocator_unbind() argument
700 power_allocator_throttle(struct thermal_zone_device *tz, int trip_id) power_allocator_throttle() argument
[all...]
H A Dthermal_sysfs.c29 struct thermal_zone_device *tz = to_thermal_zone(dev); in type_show() local
31 return sprintf(buf, "%s\n", tz->type); in type_show()
37 struct thermal_zone_device *tz = to_thermal_zone(dev); in temp_show() local
40 ret = thermal_zone_get_temp(tz, &temperature); in temp_show()
51 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_show() local
54 mutex_lock(&tz->lock); in mode_show()
55 enabled = thermal_zone_device_is_enabled(tz); in mode_show()
56 mutex_unlock(&tz->lock); in mode_show()
65 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_store() local
69 result = thermal_zone_device_enable(tz); in mode_store()
85 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_type_show() local
122 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_temp_store() local
155 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_temp_show() local
181 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_hyst_store() local
214 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_hyst_show() local
237 struct thermal_zone_device *tz = to_thermal_zone(dev); policy_store() local
253 struct thermal_zone_device *tz = to_thermal_zone(dev); policy_show() local
270 struct thermal_zone_device *tz = to_thermal_zone(dev); emul_temp_store() local
304 struct thermal_zone_device *tz = to_thermal_zone(dev); sustainable_power_show() local
316 struct thermal_zone_device *tz = to_thermal_zone(dev); sustainable_power_store() local
434 create_trip_attrs(struct thermal_zone_device *tz, int mask) create_trip_attrs() argument
530 destroy_trip_attrs(struct thermal_zone_device *tz) destroy_trip_attrs() argument
541 thermal_zone_create_device_groups(struct thermal_zone_device *tz, int mask) thermal_zone_create_device_groups() argument
573 thermal_zone_destroy_device_groups(struct thermal_zone_device *tz) thermal_zone_destroy_device_groups() argument
[all...]
H A Dthermal_hwmon.c40 struct thermal_zone_device *tz; member
59 struct thermal_zone_device *tz = temp->tz; in temp_input_show() local
61 ret = thermal_zone_get_temp(tz, &temperature); in temp_input_show()
77 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local
81 mutex_lock(&tz->lock); in temp_crit_show()
83 if (device_is_registered(&tz->device)) in temp_crit_show()
84 ret = tz->ops->get_crit_temp(tz, in temp_crit_show()
98 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) thermal_hwmon_lookup_by_type() argument
119 thermal_hwmon_lookup_temp(const struct thermal_hwmon_device *hwmon, const struct thermal_zone_device *tz) thermal_hwmon_lookup_temp() argument
135 thermal_zone_crit_temp_valid(struct thermal_zone_device *tz) thermal_zone_crit_temp_valid() argument
141 thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) thermal_add_hwmon_sysfs() argument
224 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) thermal_remove_hwmon_sysfs() argument
267 devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz) devm_thermal_add_hwmon_sysfs() argument
[all...]
H A Dthermal_of.c172 struct device_node *np, *tz; in of_thermal_zone_find() local
185 for_each_available_child_of_node(np, tz) { in of_thermal_zone_find()
189 count = of_count_phandle_with_args(tz, "thermal-sensors", in of_thermal_zone_find()
192 pr_err("%pOFn: missing thermal sensor\n", tz); in of_thermal_zone_find()
193 tz = ERR_PTR(-EINVAL); in of_thermal_zone_find()
201 ret = of_parse_phandle_with_args(tz, "thermal-sensors", in of_thermal_zone_find()
205 pr_err("%pOFn: Failed to read thermal-sensors cells: %d\n", tz, ret); in of_thermal_zone_find()
206 tz = ERR_PTR(ret); in of_thermal_zone_find()
212 pr_debug("sensor %pOFn id=%d belongs to %pOFn\n", sensor, id, tz); in of_thermal_zone_find()
217 tz in of_thermal_zone_find()
269 thermal_of_zone_get_by_name(struct thermal_zone_device *tz) thermal_of_zone_get_by_name() argument
287 __thermal_of_unbind(struct device_node *map_np, int index, int trip_id, struct thermal_zone_device *tz, struct thermal_cooling_device *cdev) __thermal_of_unbind() argument
318 __thermal_of_bind(struct device_node *map_np, int index, int trip_id, struct thermal_zone_device *tz, struct thermal_cooling_device *cdev) __thermal_of_bind() argument
353 thermal_of_for_each_cooling_device(struct device_node *tz_np, struct device_node *map_np, struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, int (*action)(struct device_node *, int, int, struct thermal_zone_device *, struct thermal_cooling_device *)) thermal_of_for_each_cooling_device() argument
386 thermal_of_for_each_cooling_maps(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, int (*action)(struct device_node *, int, int, struct thermal_zone_device *, struct thermal_cooling_device *)) thermal_of_for_each_cooling_maps() argument
419 thermal_of_bind(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev) thermal_of_bind() argument
425 thermal_of_unbind(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev) thermal_of_unbind() argument
439 thermal_of_zone_unregister(struct thermal_zone_device *tz) thermal_of_zone_unregister() argument
473 struct thermal_zone_device *tz; thermal_of_zone_register() local
603 devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz) devm_thermal_of_zone_unregister() argument
[all...]
H A Dgov_fair_share.c20 * @tz: thermal zone device
22 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument
27 for (count = 0; count < tz->num_trips; count++) { in get_trip_level()
28 __thermal_zone_get_trip(tz, count, &trip); in get_trip_level()
29 if (tz->temperature < trip.temperature) in get_trip_level()
38 trace_thermal_zone_trip(tz, count - 1, trip.type); in get_trip_level()
43 static long get_target_state(struct thermal_zone_device *tz, in get_target_state() argument
46 return (long)(percentage * level * cdev->max_state) / (100 * tz->num_trips); in get_target_state()
51 * @tz: thermal_zone_device
68 static int fair_share_throttle(struct thermal_zone_device *tz, in argument
[all...]
H A Dgov_bang_bang.c16 static int thermal_zone_trip_update(struct thermal_zone_device *tz, int trip_index) in thermal_zone_trip_update() argument
18 const struct thermal_trip *trip = &tz->trips[trip_index]; in thermal_zone_trip_update()
22 dev_info_once(&tz->device, in thermal_zone_trip_update()
23 "Zero hysteresis value for thermal zone %s\n", tz->type); in thermal_zone_trip_update()
25 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in thermal_zone_trip_update()
26 trip_index, trip->temperature, tz->temperature, in thermal_zone_trip_update()
29 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update()
48 if (instance->target == 0 && tz->temperature >= trip->temperature) in thermal_zone_trip_update()
51 tz->temperature <= trip->temperature - trip->hysteresis) in thermal_zone_trip_update()
67 * @tz
92 bang_bang_control(struct thermal_zone_device *tz, int trip) bang_bang_control() argument
[all...]
H A Dgov_step_wise.c71 static void update_passive_instance(struct thermal_zone_device *tz, in update_passive_instance() argument
79 tz->passive += value; in update_passive_instance()
82 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip_id) in thermal_zone_trip_update() argument
84 const struct thermal_trip *trip = &tz->trips[trip_id]; in thermal_zone_trip_update()
90 trend = get_tz_trend(tz, trip_id); in thermal_zone_trip_update()
92 if (tz->temperature >= trip->temperature) { in thermal_zone_trip_update()
94 trace_thermal_zone_trip(tz, trip_id, trip->type); in thermal_zone_trip_update()
97 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", in thermal_zone_trip_update()
100 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update()
115 update_passive_instance(tz, tri in thermal_zone_trip_update()
139 step_wise_throttle(struct thermal_zone_device *tz, int trip) step_wise_throttle() argument
[all...]
/kernel/linux/linux-5.10/drivers/acpi/
H A Dthermal.c185 static int acpi_thermal_get_temperature(struct acpi_thermal *tz) in acpi_thermal_get_temperature() argument
190 if (!tz) in acpi_thermal_get_temperature()
193 tz->last_temperature = tz->temperature; in acpi_thermal_get_temperature()
195 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); in acpi_thermal_get_temperature()
199 tz->temperature = tmp; in acpi_thermal_get_temperature()
201 tz->temperature)); in acpi_thermal_get_temperature()
206 static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) in acpi_thermal_get_polling_frequency() argument
211 if (!tz) in acpi_thermal_get_polling_frequency()
214 status = acpi_evaluate_integer(tz in acpi_thermal_get_polling_frequency()
225 acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode) acpi_thermal_set_cooling_mode() argument
265 acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) acpi_thermal_trips_update() argument
479 acpi_thermal_get_trip_points(struct acpi_thermal *tz) acpi_thermal_get_trip_points() argument
504 struct acpi_thermal *tz = thermal->devdata; thermal_get_temp() local
522 struct acpi_thermal *tz = thermal->devdata; thermal_get_trip_type() local
567 struct acpi_thermal *tz = thermal->devdata; thermal_get_trip_temp() local
620 struct acpi_thermal *tz = thermal->devdata; thermal_get_crit_temp() local
634 struct acpi_thermal *tz = thermal->devdata; thermal_get_trend() local
679 struct acpi_thermal *tz = thermal->devdata; thermal_notify() local
702 struct acpi_thermal *tz = thermal->devdata; acpi_thermal_cooling_device_cb() local
812 acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) acpi_thermal_register_thermal_zone() argument
883 acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz) acpi_thermal_unregister_thermal_zone() argument
897 acpi_queue_thermal_check(struct acpi_thermal *tz) acpi_queue_thermal_check() argument
905 struct acpi_thermal *tz = acpi_driver_data(device); acpi_thermal_notify() local
946 acpi_thermal_aml_dependency_fix(struct acpi_thermal *tz) acpi_thermal_aml_dependency_fix() argument
966 acpi_thermal_get_info(struct acpi_thermal *tz) acpi_thermal_get_info() argument
1010 acpi_thermal_guess_offset(struct acpi_thermal *tz) acpi_thermal_guess_offset() argument
1021 struct acpi_thermal *tz = container_of(work, struct acpi_thermal, acpi_thermal_check_fn() local
1047 struct acpi_thermal *tz = NULL; acpi_thermal_add() local
1089 struct acpi_thermal *tz = NULL; acpi_thermal_remove() local
1112 struct acpi_thermal *tz; acpi_thermal_resume() local
[all...]
/kernel/linux/linux-6.6/tools/thermal/thermal-engine/
H A Dthermal-engine.c37 struct thermal_zone *tz; member
49 static int show_temp(struct thermal_zone *tz, __maybe_unused void *arg) in show_temp() argument
51 thermal_cmd_get_temp(arg, tz); in show_temp()
53 INFO("temperature: %d\n", tz->temp); in show_temp()
58 static int show_governor(struct thermal_zone *tz, __maybe_unused void *arg) in show_governor() argument
60 thermal_cmd_get_governor(arg, tz); in show_governor()
62 INFO("governor: '%s'\n", tz->governor); in show_governor()
67 static int show_tz(struct thermal_zone *tz, __maybe_unused void *arg) in show_tz() argument
69 INFO("thermal zone '%s', id=%d\n", tz->name, tz in show_tz()
97 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); tz_disable() local
107 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); tz_enable() local
117 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); trip_high() local
128 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); trip_low() local
155 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); trip_change() local
191 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); gov_change() local
[all...]
/kernel/linux/linux-6.6/tools/lib/thermal/
H A Dthermal.c34 int for_each_thermal_zone(struct thermal_zone *tz, cb_tz_t cb, void *arg) in for_each_thermal_zone() argument
38 if (!tz) in for_each_thermal_zone()
41 for (i = 0; tz[i].id != -1; i++) in for_each_thermal_zone()
42 ret |= cb(&tz[i], arg); in for_each_thermal_zone()
47 struct thermal_zone *thermal_zone_find_by_name(struct thermal_zone *tz, in thermal_zone_find_by_name() argument
52 if (!tz || !name) in thermal_zone_find_by_name()
55 for (i = 0; tz[i].id != -1; i++) { in thermal_zone_find_by_name()
56 if (!strcmp(tz[i].name, name)) in thermal_zone_find_by_name()
57 return &tz[i]; in thermal_zone_find_by_name()
63 struct thermal_zone *thermal_zone_find_by_id(struct thermal_zone *tz, in argument
78 __thermal_zone_discover(struct thermal_zone *tz, void *th) __thermal_zone_discover() argument
91 struct thermal_zone *tz; thermal_zone_discover() local
[all...]
/kernel/linux/linux-5.10/tools/testing/selftests/timers/
H A Dset-tz.c1 /* Set tz value
30 struct timezone tz; in set_tz() local
32 tz.tz_minuteswest = min; in set_tz()
33 tz.tz_dsttime = dst; in set_tz()
35 return settimeofday(0, &tz); in set_tz()
40 struct timezone tz; in get_tz_min() local
43 memset(&tz, 0, sizeof(tz)); in get_tz_min()
44 gettimeofday(&tv, &tz); in get_tz_min()
45 return tz in get_tz_min()
50 struct timezone tz; get_tz_dst() local
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/timers/
H A Dset-tz.c1 /* Set tz value
30 struct timezone tz; in set_tz() local
32 tz.tz_minuteswest = min; in set_tz()
33 tz.tz_dsttime = dst; in set_tz()
35 return settimeofday(0, &tz); in set_tz()
40 struct timezone tz; in get_tz_min() local
43 memset(&tz, 0, sizeof(tz)); in get_tz_min()
44 gettimeofday(&tv, &tz); in get_tz_min()
45 return tz in get_tz_min()
50 struct timezone tz; get_tz_dst() local
[all...]

Completed in 15 milliseconds

12345678