| /linux/drivers/thermal/ |
| H A D | thermal_core.c | 69 * @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() 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() 73 bind_previous_governor(struct thermal_zone_device * tz,const char * failed_gov_name) bind_previous_governor() argument 95 thermal_set_governor(struct thermal_zone_device * tz,struct thermal_governor * new_gov) thermal_set_governor() argument 191 thermal_zone_device_set_policy(struct thermal_zone_device * tz,char * policy) thermal_zone_device_set_policy() argument 262 __thermal_zone_device_set_mode(struct thermal_zone_device * tz,enum thermal_device_mode mode) __thermal_zone_device_set_mode() argument 278 thermal_zone_broken_disable(struct thermal_zone_device * tz) thermal_zone_broken_disable() argument 310 thermal_zone_device_set_polling(struct thermal_zone_device * tz,unsigned long delay) thermal_zone_device_set_polling() argument 319 thermal_zone_recheck(struct thermal_zone_device * tz,int error) thermal_zone_recheck() argument 347 monitor_thermal_zone(struct thermal_zone_device * tz) monitor_thermal_zone() argument 355 thermal_get_tz_governor(struct thermal_zone_device * tz) thermal_get_tz_governor() argument 363 thermal_governor_update_tz(struct thermal_zone_device * tz,enum thermal_notify_event reason) thermal_governor_update_tz() argument 372 thermal_zone_device_halt(struct thermal_zone_device * tz,enum hw_protection_action action) thermal_zone_device_halt() argument 387 thermal_zone_device_critical(struct thermal_zone_device * tz) thermal_zone_device_critical() argument 393 thermal_zone_device_critical_shutdown(struct thermal_zone_device * tz) thermal_zone_device_critical_shutdown() argument 398 thermal_zone_device_critical_reboot(struct thermal_zone_device * tz) thermal_zone_device_critical_reboot() argument 403 handle_critical_trips(struct thermal_zone_device * tz,const struct thermal_trip * trip) handle_critical_trips() argument 435 move_to_trips_high(struct thermal_zone_device * tz,struct thermal_trip_desc * td) move_to_trips_high() argument 442 move_to_trips_reached(struct thermal_zone_device * tz,struct thermal_trip_desc * td) move_to_trips_reached() argument 449 move_to_trips_invalid(struct thermal_zone_device * tz,struct thermal_trip_desc * td) move_to_trips_invalid() argument 457 thermal_governor_trip_crossed(struct thermal_governor * governor,struct thermal_zone_device * tz,const struct thermal_trip * trip,bool upward) thermal_governor_trip_crossed() argument 468 thermal_trip_crossed(struct thermal_zone_device * tz,struct thermal_trip_desc * td,struct thermal_governor * governor,bool upward) thermal_trip_crossed() argument 495 thermal_zone_set_trip_hyst(struct thermal_zone_device * tz,struct thermal_trip * trip,int hyst) thermal_zone_set_trip_hyst() argument 512 thermal_zone_set_trip_temp(struct thermal_zone_device * tz,struct thermal_trip * trip,int temp) thermal_zone_set_trip_temp() argument 561 thermal_zone_handle_trips(struct thermal_zone_device * tz,struct thermal_governor * governor,int * low,int * high) thermal_zone_handle_trips() argument 609 __thermal_zone_device_update(struct thermal_zone_device * tz,enum thermal_notify_event event) __thermal_zone_device_update() argument 659 thermal_zone_device_set_mode(struct thermal_zone_device * tz,enum thermal_device_mode mode) thermal_zone_device_set_mode() argument 684 thermal_zone_device_enable(struct thermal_zone_device * tz) thermal_zone_device_enable() argument 690 thermal_zone_device_disable(struct thermal_zone_device * tz) thermal_zone_device_disable() argument 696 thermal_zone_is_present(struct thermal_zone_device * tz) thermal_zone_is_present() argument 701 thermal_zone_device_update(struct thermal_zone_device * tz,enum thermal_notify_event event) thermal_zone_device_update() argument 750 struct thermal_zone_device *tz; for_each_thermal_zone() local 767 struct thermal_zone_device *tz; thermal_zone_get_by_id() local 824 thermal_bind_cdev_to_trip(struct thermal_zone_device * tz,struct thermal_trip_desc * td,struct thermal_cooling_device * cdev,struct cooling_spec * cool_spec) thermal_bind_cdev_to_trip() argument 931 thermal_unbind_cdev_from_trip(struct thermal_zone_device * tz,struct thermal_trip_desc * td,struct thermal_cooling_device * cdev) thermal_unbind_cdev_from_trip() argument 958 struct thermal_zone_device *tz; thermal_release() local 980 print_bind_err_msg(struct thermal_zone_device * tz,const struct thermal_trip_desc * td,struct thermal_cooling_device * cdev,int ret) print_bind_err_msg() argument 988 __thermal_zone_cdev_bind(struct thermal_zone_device * tz,struct thermal_cooling_device * cdev) __thermal_zone_cdev_bind() argument 1020 thermal_zone_cdev_bind(struct thermal_zone_device * tz,struct thermal_cooling_device * cdev) thermal_zone_cdev_bind() argument 1031 struct thermal_zone_device *tz; thermal_cooling_device_init_complete() local 1317 __thermal_zone_cdev_unbind(struct thermal_zone_device * tz,struct thermal_cooling_device * cdev) __thermal_zone_cdev_unbind() argument 1326 thermal_zone_cdev_unbind(struct thermal_zone_device * tz,struct thermal_cooling_device * cdev) thermal_zone_cdev_unbind() argument 1336 struct thermal_zone_device *tz; thermal_cooling_device_exit() local 1367 thermal_zone_get_crit_temp(struct thermal_zone_device * tz,int * temp) thermal_zone_get_crit_temp() argument 1393 struct thermal_zone_device *tz = container_of(work, struct thermal_zone_device_check() local 1399 thermal_zone_device_init(struct thermal_zone_device * tz) thermal_zone_device_init() argument 1432 thermal_zone_init_governor(struct thermal_zone_device * tz) thermal_zone_init_governor() argument 1446 thermal_zone_init_complete(struct thermal_zone_device * tz) thermal_zone_init_complete() argument 1506 struct thermal_zone_device *tz; thermal_zone_device_register_with_trips() local 1688 thermal_zone_exit(struct thermal_zone_device * tz) thermal_zone_exit() argument 1713 thermal_zone_device_unregister(struct thermal_zone_device * tz) thermal_zone_device_unregister() argument 1782 struct thermal_zone_device *tz; thermal_zone_device_resume() local 1798 thermal_zone_pm_prepare(struct thermal_zone_device * tz) thermal_zone_pm_prepare() argument 1818 struct thermal_zone_device *tz; thermal_pm_notify_prepare() local 1828 thermal_zone_pm_complete(struct thermal_zone_device * tz) thermal_zone_pm_complete() argument 1848 struct thermal_zone_device *tz; thermal_pm_notify_complete() local [all...] |
| H A D | thermal_helpers.c | 25 int get_tz_trend(struct thermal_zone_device *tz, const struct thermal_trip *trip) in get_tz_trend() argument 29 if (tz->emul_temperature || !tz->ops.get_trend || in get_tz_trend() 30 tz->ops.get_trend(tz, trip, &trend)) { in get_tz_trend() 31 if (tz->temperature > tz->last_temperature) in get_tz_trend() 33 else if (tz->temperature < tz->last_temperature) in get_tz_trend() 42 static bool thermal_instance_present(struct thermal_zone_device *tz, in thermal_instance_present() argument 57 bool thermal_trip_is_bound_to_cdev(struct thermal_zone_device *tz, in thermal_trip_is_bound_to_cdev() argument 61 guard(thermal_zone)(tz); in thermal_trip_is_bound_to_cdev() 64 return thermal_instance_present(tz, cdev, trip); in thermal_trip_is_bound_to_cdev() 82 int __thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) in __thermal_zone_get_temp() argument [all …]
|
| H A D | gov_power_allocator.c | 116 static u32 estimate_sustainable_power(struct thermal_zone_device *tz) in estimate_sustainable_power() argument 118 struct power_allocator_params *params = tz->governor_data; in estimate_sustainable_power() 149 static void estimate_pid_constants(struct thermal_zone_device *tz, in estimate_pid_constants() argument 171 tz->tzp->k_po = int_to_frac(sustainable_power) / in estimate_pid_constants() 174 tz->tzp->k_pu = int_to_frac(2 * sustainable_power) / in estimate_pid_constants() 177 k_i = tz->tzp->k_pu / 10; in estimate_pid_constants() 178 tz->tzp->k_i = k_i > 0 ? k_i : 1; in estimate_pid_constants() 197 static u32 get_sustainable_power(struct thermal_zone_device *tz, in get_sustainable_power() argument 203 if (!tz->tzp->sustainable_power) in get_sustainable_power() 204 sustainable_power = estimate_sustainable_power(tz); in get_sustainable_power() [all …]
|
| H A D | thermal_netlink.h | 37 int thermal_notify_tz_create(const struct thermal_zone_device *tz); 38 int thermal_notify_tz_delete(const struct thermal_zone_device *tz); 39 int thermal_notify_tz_enable(const struct thermal_zone_device *tz); 40 int thermal_notify_tz_disable(const struct thermal_zone_device *tz); 41 int thermal_notify_tz_trip_down(const struct thermal_zone_device *tz, 43 int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz, 45 int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz, 51 int thermal_notify_tz_gov_change(const struct thermal_zone_device *tz, 56 int thermal_notify_threshold_add(const struct thermal_zone_device *tz, 58 int thermal_notify_threshold_delete(const struct thermal_zone_device *tz, [all …]
|
| H A D | thermal_thresholds.c | 16 int thermal_thresholds_init(struct thermal_zone_device *tz) in thermal_thresholds_init() argument 18 INIT_LIST_HEAD(&tz->user_thresholds); in thermal_thresholds_init() 23 static void __thermal_thresholds_flush(struct thermal_zone_device *tz) in __thermal_thresholds_flush() argument 25 struct list_head *thresholds = &tz->user_thresholds; in __thermal_thresholds_flush() 34 void thermal_thresholds_flush(struct thermal_zone_device *tz) in thermal_thresholds_flush() argument 36 lockdep_assert_held(&tz->lock); in thermal_thresholds_flush() 38 __thermal_thresholds_flush(tz); in thermal_thresholds_flush() 40 thermal_notify_threshold_flush(tz); in thermal_thresholds_flush() 42 __thermal_zone_device_update(tz, THERMAL_TZ_FLUSH_THRESHOLDS); in thermal_thresholds_flush() 45 void thermal_thresholds_exit(struct thermal_zone_device *tz) in thermal_thresholds_exit() argument [all …]
|
| H A D | thermal_trip.c | 27 int for_each_thermal_trip(struct thermal_zone_device *tz, in for_each_thermal_trip() argument 34 for_each_trip_desc(tz, td) { in for_each_thermal_trip() 44 int thermal_zone_for_each_trip(struct thermal_zone_device *tz, in thermal_zone_for_each_trip() argument 48 guard(thermal_zone)(tz); in thermal_zone_for_each_trip() 50 return for_each_thermal_trip(tz, cb, data); in thermal_zone_for_each_trip() 54 void thermal_zone_set_trips(struct thermal_zone_device *tz, int low, int high) in thermal_zone_set_trips() argument 58 lockdep_assert_held(&tz->lock); in thermal_zone_set_trips() 60 if (!tz->ops.set_trips) in thermal_zone_set_trips() 64 if (tz->prev_low_trip == low && tz->prev_high_trip == high) in thermal_zone_set_trips() 67 tz->prev_low_trip = low; in thermal_zone_set_trips() [all …]
|
| H A D | thermal_hwmon.c | 40 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 guard(thermal_zone)(tz); in temp_crit_show() 83 ret = tz->ops.get_crit_temp(tz, &temperature); in temp_crit_show() 92 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) in thermal_hwmon_lookup_by_type() argument 99 strscpy(type, tz->type); in thermal_hwmon_lookup_by_type() 114 const struct thermal_zone_device *tz) in thermal_hwmon_lookup_temp() argument 120 if (temp->tz == tz) { in thermal_hwmon_lookup_temp() [all …]
|
| H A D | thermal_sysfs.c | 30 struct thermal_zone_device *tz = to_thermal_zone(dev); in type_show() local 32 return sysfs_emit(buf, "%s\n", tz->type); in type_show() 38 struct thermal_zone_device *tz = to_thermal_zone(dev); in temp_show() local 41 ret = thermal_zone_get_temp(tz, &temperature); in temp_show() 55 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_show() local 57 guard(thermal_zone)(tz); in mode_show() 59 if (tz->mode == THERMAL_DEVICE_ENABLED) in mode_show() 69 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_store() local 73 result = thermal_zone_device_enable(tz); in mode_store() 75 result = thermal_zone_device_disable(tz); in mode_store() [all …]
|
| H A D | thermal_netlink.c | 351 int thermal_notify_tz_create(const struct thermal_zone_device *tz) in thermal_notify_tz_create() argument 353 struct param p = { .tz_id = tz->id, .name = tz->type }; in thermal_notify_tz_create() 358 int thermal_notify_tz_delete(const struct thermal_zone_device *tz) in thermal_notify_tz_delete() argument 360 struct param p = { .tz_id = tz->id }; in thermal_notify_tz_delete() 365 int thermal_notify_tz_enable(const struct thermal_zone_device *tz) in thermal_notify_tz_enable() argument 367 struct param p = { .tz_id = tz->id }; in thermal_notify_tz_enable() 372 int thermal_notify_tz_disable(const struct thermal_zone_device *tz) in thermal_notify_tz_disable() argument 374 struct param p = { .tz_id = tz->id }; in thermal_notify_tz_disable() 379 int thermal_notify_tz_trip_down(const struct thermal_zone_device *tz, in thermal_notify_tz_trip_down() argument 382 struct param p = { .tz_id = tz->id, in thermal_notify_tz_trip_down() [all …]
|
| H A D | thermal_debugfs.h | 8 void thermal_debug_tz_add(struct thermal_zone_device *tz); 9 void thermal_debug_tz_remove(struct thermal_zone_device *tz); 10 void thermal_debug_tz_resume(struct thermal_zone_device *tz); 11 void thermal_debug_tz_trip_up(struct thermal_zone_device *tz, 13 void thermal_debug_tz_trip_down(struct thermal_zone_device *tz, 15 void thermal_debug_update_trip_stats(struct thermal_zone_device *tz); 22 static inline void thermal_debug_tz_add(struct thermal_zone_device *tz) {} in thermal_debug_tz_add() argument 23 static inline void thermal_debug_tz_remove(struct thermal_zone_device *tz) {} in thermal_debug_tz_remove() argument 24 static inline void thermal_debug_tz_resume(struct thermal_zone_device *tz) {} in thermal_debug_tz_resume() argument 25 static inline void thermal_debug_tz_trip_up(struct thermal_zone_device *tz, in thermal_debug_tz_trip_up() argument [all …]
|
| H A D | gov_bang_bang.c | 63 static void bang_bang_trip_crossed(struct thermal_zone_device *tz, in bang_bang_trip_crossed() argument 70 lockdep_assert_held(&tz->lock); in bang_bang_trip_crossed() 72 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in bang_bang_trip_crossed() 73 thermal_zone_trip_id(tz, trip), trip->temperature, in bang_bang_trip_crossed() 74 tz->temperature, trip->hysteresis); in bang_bang_trip_crossed() 80 static void bang_bang_manage(struct thermal_zone_device *tz) in bang_bang_manage() argument 86 if (tz->governor_data) in bang_bang_manage() 89 for_each_trip_desc(tz, td) { in bang_bang_manage() 102 turn_on = tz->temperature >= td->threshold; in bang_bang_manage() 109 tz->governor_data = (void *)true; in bang_bang_manage() [all …]
|
| H A D | gov_fair_share.c | 18 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument 24 for_each_trip_desc(tz, td) { in get_trip_level() 25 if (td->threshold > tz->temperature) in get_trip_level() 38 trace_thermal_zone_trip(tz, thermal_zone_trip_id(tz, &level_td->trip), in get_trip_level() 63 static void fair_share_throttle(struct thermal_zone_device *tz, in fair_share_throttle() argument 83 divisor = tz->num_trips; in fair_share_throttle() 96 static void fair_share_manage(struct thermal_zone_device *tz) in fair_share_manage() argument 98 int trip_level = get_trip_level(tz); in fair_share_manage() 101 lockdep_assert_held(&tz->lock); in fair_share_manage() 103 for_each_trip_desc(tz, td) { in fair_share_manage() [all …]
|
| H A D | thermal_debugfs.c | 152 struct thermal_zone_device *tz; member 556 static struct tz_episode *thermal_debugfs_tz_event_alloc(struct thermal_zone_device *tz, in thermal_debugfs_tz_event_alloc() argument 562 tze = kzalloc_flex(*tze, trip_stats, tz->num_trips); in thermal_debugfs_tz_event_alloc() 571 for (i = 0; i < tz->num_trips; i++) { in thermal_debugfs_tz_event_alloc() 579 void thermal_debug_tz_trip_up(struct thermal_zone_device *tz, in thermal_debug_tz_trip_up() argument 582 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_trip_up() 583 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_debug_tz_trip_up() 630 tze = thermal_debugfs_tz_event_alloc(tz, now); in thermal_debug_tz_trip_up() 672 void thermal_debug_tz_trip_down(struct thermal_zone_device *tz, in thermal_debug_tz_trip_down() argument 675 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_trip_down() [all …]
|
| H A D | thermal_core.h | 55 int (*bind_to_tz)(struct thermal_zone_device *tz); 56 void (*unbind_from_tz)(struct thermal_zone_device *tz); 57 void (*trip_crossed)(struct thermal_zone_device *tz, 60 void (*manage)(struct thermal_zone_device *tz); 61 void (*update_tz)(struct thermal_zone_device *tz, 229 int get_tz_trend(struct thermal_zone_device *tz, const struct thermal_trip *trip); 265 void __thermal_zone_device_update(struct thermal_zone_device *tz, 267 void thermal_zone_device_critical_reboot(struct thermal_zone_device *tz); 268 void thermal_zone_device_critical_shutdown(struct thermal_zone_device *tz); 269 void thermal_governor_update_tz(struct thermal_zone_device *tz, [all …]
|
| H A D | gov_step_wise.c | 81 static void thermal_zone_trip_update(struct thermal_zone_device *tz, in thermal_zone_trip_update() argument 85 bool throttle = tz->temperature >= trip_threshold; in thermal_zone_trip_update() 87 enum thermal_trend trend = get_tz_trend(tz, trip); in thermal_zone_trip_update() 88 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_zone_trip_update() 92 trace_thermal_zone_trip(tz, trip_id, trip->type); in thermal_zone_trip_update() 94 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", in thermal_zone_trip_update() 117 static void step_wise_manage(struct thermal_zone_device *tz) in step_wise_manage() argument 122 lockdep_assert_held(&tz->lock); in step_wise_manage() 131 for_each_trip_desc(tz, td) { in step_wise_manage() 139 thermal_zone_trip_update(tz, td, td->threshold); in step_wise_manage() [all …]
|
| H A D | gov_user_space.c | 18 static int user_space_bind(struct thermal_zone_device *tz) in user_space_bind() argument 33 static void user_space_trip_crossed(struct thermal_zone_device *tz, in user_space_trip_crossed() argument 40 lockdep_assert_held(&tz->lock); in user_space_trip_crossed() 42 thermal_prop[0] = kasprintf(GFP_KERNEL, "NAME=%s", tz->type); in user_space_trip_crossed() 43 thermal_prop[1] = kasprintf(GFP_KERNEL, "TEMP=%d", tz->temperature); in user_space_trip_crossed() 45 thermal_zone_trip_id(tz, trip)); in user_space_trip_crossed() 46 thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", tz->notify_event); in user_space_trip_crossed() 48 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, thermal_prop); in user_space_trip_crossed()
|
| /linux/drivers/acpi/ |
| H A D | thermal.c | 60 #define ACPI_THERMAL_TRIPS_EXCEPTION(tz, str) \ argument 62 acpi_handle_info(tz->device->handle, \ 129 static int acpi_thermal_get_temperature(struct acpi_thermal *tz) in acpi_thermal_get_temperature() argument 134 if (!tz) in acpi_thermal_get_temperature() 137 tz->last_temp_dk = tz->temp_dk; in acpi_thermal_get_temperature() 139 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); in acpi_thermal_get_temperature() 143 tz->temp_dk = tmp; in acpi_thermal_get_temperature() 145 acpi_handle_debug(tz->device->handle, "Temperature is %lu dK\n", in acpi_thermal_get_temperature() 146 tz->temp_dk); in acpi_thermal_get_temperature() 151 static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) in acpi_thermal_get_polling_frequency() argument [all …]
|
| /linux/tools/thermal/thermal-engine/ |
| H A D | thermal-engine.c | 37 struct thermal_zone *tz; member 57 static int show_temp(struct thermal_zone *tz, __maybe_unused void *arg) in show_temp() argument 59 thermal_cmd_get_temp(arg, tz); in show_temp() 61 INFO("temperature: %d\n", tz->temp); in show_temp() 66 static int show_governor(struct thermal_zone *tz, __maybe_unused void *arg) in show_governor() argument 68 thermal_cmd_get_governor(arg, tz); in show_governor() 70 INFO("governor: '%s'\n", tz->governor); in show_governor() 75 static int show_tz(struct thermal_zone *tz, __maybe_unused void *arg) in show_tz() argument 77 INFO("thermal zone '%s', id=%d\n", tz->name, tz->id); in show_tz() 79 for_each_thermal_trip(tz->trip, show_trip, NULL); in show_tz() [all …]
|
| /linux/tools/lib/thermal/ |
| H A D | thermal.c | 48 int for_each_thermal_zone(struct thermal_zone *tz, cb_tz_t cb, void *arg) in for_each_thermal_zone() argument 52 if (!tz) in for_each_thermal_zone() 55 for (i = 0; tz[i].id != -1; i++) in for_each_thermal_zone() 56 ret |= cb(&tz[i], arg); in for_each_thermal_zone() 61 struct thermal_zone *thermal_zone_find_by_name(struct thermal_zone *tz, in thermal_zone_find_by_name() argument 66 if (!tz || !name) in thermal_zone_find_by_name() 69 for (i = 0; tz[i].id != -1; i++) { in thermal_zone_find_by_name() 70 if (!strcmp(tz[i].name, name)) in thermal_zone_find_by_name() 71 return &tz[i]; in thermal_zone_find_by_name() 77 struct thermal_zone *thermal_zone_find_by_id(struct thermal_zone *tz, int id) in thermal_zone_find_by_id() argument [all …]
|
| H A D | commands.c | 44 static int parse_tz_get(struct genl_info *info, struct thermal_zone **tz) in parse_tz_get() argument 73 *tz = __tz; in parse_tz_get() 118 static int parse_tz_get_trip(struct genl_info *info, struct thermal_zone *tz) in parse_tz_get_trip() argument 151 tz->trip = __tt; in parse_tz_get_trip() 156 static int parse_tz_get_temp(struct genl_info *info, struct thermal_zone *tz) in parse_tz_get_temp() argument 163 if (tz->id != id) in parse_tz_get_temp() 167 tz->temp = nla_get_u32(info->attrs[THERMAL_GENL_ATTR_TZ_TEMP]); in parse_tz_get_temp() 172 static int parse_tz_get_gov(struct genl_info *info, struct thermal_zone *tz) in parse_tz_get_gov() argument 179 if (tz->id != id) in parse_tz_get_gov() 183 nla_strlcpy(tz->governor, in parse_tz_get_gov() [all …]
|
| /linux/tools/thermal/thermometer/ |
| H A D | thermometer.c | 57 struct tz { struct 66 struct tz *tz; argument 105 config_setting_t *tz; in configuration_init() local 127 tz = config_lookup(&cfg, "thermal-zones"); in configuration_init() 128 if (!tz) { in configuration_init() 133 length = config_setting_length(tz); in configuration_init() 143 node = config_setting_get_elem(tz, i); in configuration_init() 262 struct tz *tz; in thermometer_add_tz() local 272 tz = realloc(thermometer->tz, sizeof(*thermometer->tz) * (thermometer->nr_tz + 1)); in thermometer_add_tz() 273 if (!tz) { in thermometer_add_tz() [all …]
|
| /linux/tools/testing/selftests/timers/ |
| H A D | set-tz.c | 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.tz_minuteswest; in get_tz_min() 50 struct timezone tz; in get_tz_dst() local 53 memset(&tz, 0, sizeof(tz)); in get_tz_dst() [all …]
|
| /linux/include/linux/ |
| H A D | thermal.h | 199 void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz); 211 struct thermal_zone_device *tz) in devm_thermal_of_zone_unregister() argument 216 int for_each_thermal_trip(struct thermal_zone_device *tz, 219 int thermal_zone_for_each_trip(struct thermal_zone_device *tz, 222 void thermal_zone_set_trip_temp(struct thermal_zone_device *tz, 225 int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp); 243 void thermal_zone_device_unregister(struct thermal_zone_device *tz); 266 int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); 267 int thermal_zone_get_slope(struct thermal_zone_device *tz); 268 int thermal_zone_get_offset(struct thermal_zone_device *tz); [all …]
|
| /linux/drivers/thermal/broadcom/ |
| H A D | bcm2835_thermal.c | 68 struct thermal_zone_device *tz; member 87 static int bcm2835_thermal_get_temp(struct thermal_zone_device *tz, int *temp) in bcm2835_thermal_get_temp() argument 89 struct bcm2835_thermal_data *data = thermal_zone_device_priv(tz); in bcm2835_thermal_get_temp() 99 thermal_zone_get_offset(data->tz), in bcm2835_thermal_get_temp() 100 thermal_zone_get_slope(data->tz)); in bcm2835_thermal_get_temp() 164 struct thermal_zone_device *tz; in bcm2835_thermal_probe() local 195 tz = devm_thermal_of_zone_register(dev, 0, data, &bcm2835_thermal_ops); in bcm2835_thermal_probe() 196 if (IS_ERR(tz)) in bcm2835_thermal_probe() 197 return dev_err_probe(dev, PTR_ERR(tz), "Failed to register the thermal device\n"); in bcm2835_thermal_probe() 209 slope = thermal_zone_get_slope(tz); in bcm2835_thermal_probe() [all …]
|
| /linux/fs/isofs/ |
| H A D | util.c | 21 int year, month, day, hour, minute, second, tz; in iso_date() local 35 tz = p[16]; in iso_date() 45 tz = flags & ISO_DATE_HIGH_SIERRA ? 0 : p[6]; in iso_date() 54 if (tz & 0x80) in iso_date() 55 tz |= (-1 << 8); in iso_date() 82 if (-52 <= tz && tz <= 52) in iso_date() 83 ts.tv_sec -= tz * 15 * 60; in iso_date()
|