Home
last modified time | relevance | path

Searched full:tz (Results 1 – 25 of 220) sorted by relevance

123456789

/linux/drivers/thermal/
H A Dthermal_core.c67 * @tz: a valid pointer to a struct thermal_zone_device
73 static void bind_previous_governor(struct thermal_zone_device *tz, in bind_previous_governor() argument
76 if (tz->governor && tz->governor->bind_to_tz) { in bind_previous_governor()
77 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor()
78 dev_err(&tz->device, in bind_previous_governor()
80 failed_gov_name, tz->governor->name, tz->type); in bind_previous_governor()
81 tz in bind_previous_governor()
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
1684 thermal_zone_exit(struct thermal_zone_device * tz) thermal_zone_exit() argument
1709 thermal_zone_device_unregister(struct thermal_zone_device * tz) thermal_zone_device_unregister() argument
1778 struct thermal_zone_device *tz; thermal_zone_device_resume() local
1794 thermal_zone_pm_prepare(struct thermal_zone_device * tz) thermal_zone_pm_prepare() argument
1814 struct thermal_zone_device *tz; thermal_pm_notify_prepare() local
1824 thermal_zone_pm_complete(struct thermal_zone_device * tz) thermal_zone_pm_complete() argument
1844 struct thermal_zone_device *tz; thermal_pm_notify_complete() local
[all...]
H A Dthermal_helpers.c25 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 thermal_trip_is_bound_to_cdev(struct thermal_zone_device * tz,const struct thermal_trip * trip,struct thermal_cooling_device * cdev) thermal_trip_is_bound_to_cdev() argument
82 __thermal_zone_get_temp(struct thermal_zone_device * tz,int * temp) __thermal_zone_get_temp() argument
127 thermal_zone_get_temp(struct thermal_zone_device * tz,int * temp) thermal_zone_get_temp() argument
219 thermal_zone_get_slope(struct thermal_zone_device * tz) thermal_zone_get_slope() argument
234 thermal_zone_get_offset(struct thermal_zone_device * tz) thermal_zone_get_offset() argument
[all...]
H A Dthermal_thresholds.c16 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
128 thermal_thresholds_handle(struct thermal_zone_device * tz,int * low,int * high) thermal_thresholds_handle() argument
168 thermal_thresholds_add(struct thermal_zone_device * tz,int temperature,int direction) thermal_thresholds_add() argument
202 thermal_thresholds_delete(struct thermal_zone_device * tz,int temperature,int direction) thermal_thresholds_delete() argument
228 thermal_thresholds_for_each(struct thermal_zone_device * tz,int (* cb)(struct user_threshold *,void * arg),void * arg) thermal_thresholds_for_each() argument
[all...]
H A Dgov_power_allocator.c107 * @tz: thermal zone we are operating in
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()
141 * @tz: thermal zone for which to estimate the constants
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()
188 * @tz
197 get_sustainable_power(struct thermal_zone_device * tz,struct power_allocator_params * params,int control_temp) get_sustainable_power() argument
239 pid_controller(struct thermal_zone_device * tz,int control_temp,u32 max_allocatable_power) pid_controller() argument
406 allocate_power(struct thermal_zone_device * tz,int control_temp) allocate_power() argument
500 get_governor_trips(struct thermal_zone_device * tz,struct power_allocator_params * params) get_governor_trips() argument
545 allow_maximum_power(struct thermal_zone_device * tz) allow_maximum_power() argument
588 check_power_actors(struct thermal_zone_device * tz,struct power_allocator_params * params) check_power_actors() argument
660 power_allocator_update_tz(struct thermal_zone_device * tz,enum thermal_notify_event reason) power_allocator_update_tz() argument
697 power_allocator_bind(struct thermal_zone_device * tz) power_allocator_bind() argument
757 power_allocator_unbind(struct thermal_zone_device * tz) power_allocator_unbind() argument
773 power_allocator_manage(struct thermal_zone_device * tz) power_allocator_manage() 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 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
114 thermal_hwmon_lookup_temp(const struct thermal_hwmon_device * hwmon,const struct thermal_zone_device * tz) thermal_hwmon_lookup_temp() argument
129 thermal_zone_crit_temp_valid(struct thermal_zone_device * tz) thermal_zone_crit_temp_valid() argument
135 thermal_add_hwmon_sysfs(struct thermal_zone_device * tz) thermal_add_hwmon_sysfs() argument
218 thermal_remove_hwmon_sysfs(struct thermal_zone_device * tz) thermal_remove_hwmon_sysfs() argument
261 devm_thermal_add_hwmon_sysfs(struct device * dev,struct thermal_zone_device * tz) devm_thermal_add_hwmon_sysfs() argument
[all...]
H A Dthermal_trip.c27 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 in thermal_zone_set_trips()
82 thermal_zone_trip_id(const struct thermal_zone_device * tz,const struct thermal_trip * trip) thermal_zone_trip_id() argument
[all...]
H A Dthermal_sysfs.c30 struct thermal_zone_device *tz = to_thermal_zone(dev); in type_show() local
32 return sprintf(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()
108 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_temp_store() local
153 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_hyst_store() local
198 struct thermal_zone_device *tz = to_thermal_zone(dev); policy_store() local
214 struct thermal_zone_device *tz = to_thermal_zone(dev); policy_show() local
231 struct thermal_zone_device *tz = to_thermal_zone(dev); emul_temp_store() local
260 struct thermal_zone_device *tz = to_thermal_zone(dev); sustainable_power_show() local
272 struct thermal_zone_device *tz = to_thermal_zone(dev); sustainable_power_store() local
389 create_trip_attrs(struct thermal_zone_device * tz) create_trip_attrs() argument
454 destroy_trip_attrs(struct thermal_zone_device * tz) destroy_trip_attrs() argument
460 thermal_zone_create_device_groups(struct thermal_zone_device * tz) thermal_zone_create_device_groups() argument
491 thermal_zone_destroy_device_groups(struct thermal_zone_device * tz) thermal_zone_destroy_device_groups() argument
844 struct thermal_zone_device *tz = to_thermal_zone(dev); trip_point_show() local
865 struct thermal_zone_device *tz = to_thermal_zone(dev); weight_store() local
[all...]
H A Dthermal_debugfs.h8 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
27 thermal_debug_tz_trip_down(struct thermal_zone_device * tz,const struct thermal_trip * trip) thermal_debug_tz_trip_down() argument
29 thermal_debug_update_trip_stats(struct thermal_zone_device * tz) thermal_debug_update_trip_stats() argument
[all...]
H A Dgov_bang_bang.c59 * @tz: thermal_zone_device
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 in bang_bang_manage()
112 bang_bang_update_tz(struct thermal_zone_device * tz,enum thermal_notify_event reason) bang_bang_update_tz() argument
[all...]
H A Dthermal_thresholds.h11 int thermal_thresholds_init(struct thermal_zone_device *tz);
12 void thermal_thresholds_exit(struct thermal_zone_device *tz);
13 void thermal_thresholds_handle(struct thermal_zone_device *tz, int *low, int *high);
14 void thermal_thresholds_flush(struct thermal_zone_device *tz);
15 int thermal_thresholds_add(struct thermal_zone_device *tz, int temperature, int direction);
16 int thermal_thresholds_delete(struct thermal_zone_device *tz, int temperature, int direction);
17 int thermal_thresholds_for_each(struct thermal_zone_device *tz,
H A Dgov_user_space.c18 static int user_space_bind(struct thermal_zone_device *tz) in user_space_bind() argument
27 * @tz: thermal_zone_device
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()
H A Dthermal_debugfs.c122 * @node: a list element to be added to the list of tz events
146 * @tz: thermal zone this object belongs to
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(struct_size(tze, trip_stats, tz->num_trips), GFP_KERNEL); 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, no in thermal_debug_tz_trip_up()
672 thermal_debug_tz_trip_down(struct thermal_zone_device * tz,const struct thermal_trip * trip) thermal_debug_tz_trip_down() argument
727 thermal_debug_update_trip_stats(struct thermal_zone_device * tz) thermal_debug_update_trip_stats() argument
789 struct thermal_zone_device *tz = thermal_dbg->tz_dbg.tz; tze_seq_show() local
866 thermal_debug_tz_add(struct thermal_zone_device * tz) thermal_debug_tz_add() argument
893 thermal_debug_tz_clear(struct thermal_zone_device * tz) thermal_debug_tz_clear() argument
906 thermal_debug_tz_remove(struct thermal_zone_device * tz) thermal_debug_tz_remove() argument
934 thermal_debug_tz_resume(struct thermal_zone_device * tz) thermal_debug_tz_resume() argument
[all...]
H A Dgov_step_wise.c68 static void thermal_zone_trip_update(struct thermal_zone_device *tz, in thermal_zone_trip_update() argument
73 enum thermal_trend trend = get_tz_trend(tz, trip); in thermal_zone_trip_update()
74 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_zone_trip_update()
78 if (tz->temperature >= trip_threshold) { in thermal_zone_trip_update()
80 trace_thermal_zone_trip(tz, trip_id, trip->type); in thermal_zone_trip_update()
83 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", in thermal_zone_trip_update()
106 static void step_wise_manage(struct thermal_zone_device *tz) in step_wise_manage() argument
111 lockdep_assert_held(&tz->lock); in step_wise_manage()
120 for_each_trip_desc(tz, td) { in step_wise_manage()
128 thermal_zone_trip_update(tz, t in step_wise_manage()
[all...]
H A Dthermal_trace_ipa.h13 TP_PROTO(struct thermal_zone_device *tz, u32 total_req_power,
16 TP_ARGS(tz, total_req_power, total_granted_power, num_actors,
29 __entry->tz_id = tz->id;
47 TP_PROTO(struct thermal_zone_device *tz, int actor_id, u32 req_power,
49 TP_ARGS(tz, actor_id, req_power, granted_power),
57 __entry->tz_id = tz->id;
69 TP_PROTO(struct thermal_zone_device *tz, s32 err, s32 err_integral,
71 TP_ARGS(tz, err, err_integral, p, i, d, output),
82 __entry->tz_id = tz->id;
H A Dthermal_of.c225 static struct device_node *thermal_of_zone_get_by_name(struct thermal_zone_device *tz) in thermal_of_zone_get_by_name() argument
233 tz_np = of_get_child_by_name(np, tz->type); in thermal_of_zone_get_by_name()
305 static bool thermal_of_should_bind(struct thermal_zone_device *tz, in thermal_of_should_bind() argument
313 tz_np = thermal_of_zone_get_by_name(tz); in thermal_of_should_bind()
315 pr_err("Failed to get node tz by name\n"); in thermal_of_should_bind()
339 * @tz: a pointer to the thermal zone structure
341 static void thermal_of_zone_unregister(struct thermal_zone_device *tz) in thermal_of_zone_unregister() argument
343 thermal_zone_device_disable(tz); in thermal_of_zone_unregister()
344 thermal_zone_device_unregister(tz); in thermal_of_zone_unregister()
371 struct thermal_zone_device *tz; in thermal_of_zone_register() local
507 devm_thermal_of_zone_unregister(struct device * dev,struct thermal_zone_device * tz) devm_thermal_of_zone_unregister() argument
[all...]
/linux/tools/lib/thermal/
H A Dthermal.c48 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, in argument
92 __thermal_zone_discover(struct thermal_zone * tz,void * th) __thermal_zone_discover() argument
108 struct thermal_zone *tz; thermal_zone_discover() local
[all...]
H A Dcommands.c44 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 in parse_tz_get_gov()
191 parse_threshold_get(struct genl_info * info,struct thermal_zone * tz) parse_threshold_get() argument
404 thermal_cmd_get_tz(struct thermal_handler * th,struct thermal_zone ** tz) thermal_cmd_get_tz() argument
416 thermal_cmd_get_trip(struct thermal_handler * th,struct thermal_zone * tz) thermal_cmd_get_trip() argument
424 thermal_cmd_get_governor(struct thermal_handler * th,struct thermal_zone * tz) thermal_cmd_get_governor() argument
432 thermal_cmd_get_temp(struct thermal_handler * th,struct thermal_zone * tz) thermal_cmd_get_temp() argument
441 thermal_cmd_threshold_get(struct thermal_handler * th,struct thermal_zone * tz) thermal_cmd_threshold_get() argument
450 thermal_cmd_threshold_add(struct thermal_handler * th,struct thermal_zone * tz,int temperature,int direction) thermal_cmd_threshold_add() argument
461 thermal_cmd_threshold_delete(struct thermal_handler * th,struct thermal_zone * tz,int temperature,int direction) thermal_cmd_threshold_delete() argument
472 thermal_cmd_threshold_flush(struct thermal_handler * th,struct thermal_zone * tz) thermal_cmd_threshold_flush() argument
[all...]
/linux/tools/thermal/thermal-engine/
H A Dthermal-engine.c37 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 in show_tz()
90 set_threshold(struct thermal_zone * tz,__maybe_unused void * arg) set_threshold() argument
131 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); tz_disable() local
141 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); tz_enable() local
151 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); trip_high() local
162 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); trip_low() local
189 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); trip_change() local
225 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); gov_change() local
[all...]
/linux/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...]
/linux/tools/thermal/thermometer/
H A Dthermometer.c57 struct tz { struct
66 struct tz *tz; member
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
344 struct tz *tz = arg; timer_temperature_callback() local
[all...]
/linux/include/linux/
H A Dthermal.h199 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);
293 thermal_zone_device_unregister(struct thermal_zone_device * tz) thermal_zone_device_unregister() argument
296 thermal_zone_device_update(struct thermal_zone_device * tz,enum thermal_notify_event event) thermal_zone_device_update() argument
324 thermal_zone_get_temp(struct thermal_zone_device * tz,int * temp) thermal_zone_get_temp() argument
327 thermal_zone_get_slope(struct thermal_zone_device * tz) thermal_zone_get_slope() argument
330 thermal_zone_get_offset(struct thermal_zone_device * tz) thermal_zone_get_offset() argument
333 thermal_zone_device_priv(struct thermal_zone_device * tz) thermal_zone_device_priv() argument
348 thermal_zone_device_enable(struct thermal_zone_device * tz) thermal_zone_device_enable() argument
351 thermal_zone_device_disable(struct thermal_zone_device * tz) thermal_zone_device_disable() argument
[all...]
/linux/drivers/thermal/broadcom/
H A Dbcm2835_thermal.c67 struct thermal_zone_device *tz; member
91 static int bcm2835_thermal_get_temp(struct thermal_zone_device *tz, int *temp) in bcm2835_thermal_get_temp() argument
93 struct bcm2835_thermal_data *data = thermal_zone_device_priv(tz); in bcm2835_thermal_get_temp()
103 thermal_zone_get_offset(data->tz), in bcm2835_thermal_get_temp()
104 thermal_zone_get_slope(data->tz)); in bcm2835_thermal_get_temp()
168 struct thermal_zone_device *tz; in bcm2835_thermal_probe() local
199 tz = devm_thermal_of_zone_register(dev, 0, data, &bcm2835_thermal_ops); in bcm2835_thermal_probe()
200 if (IS_ERR(tz)) in bcm2835_thermal_probe()
201 return dev_err_probe(dev, PTR_ERR(tz), "Failed to register the thermal device\n"); in bcm2835_thermal_probe()
213 slope = thermal_zone_get_slope(tz); in bcm2835_thermal_probe()
[all...]
/linux/tools/include/nolibc/sys/
H A Dtime.h19 * int gettimeofday(struct timeval *tv, struct timezone *tz);
23 int sys_gettimeofday(struct timeval *tv, struct timezone *tz) in sys_gettimeofday() argument
26 return my_syscall2(__NR_gettimeofday, tv, tz); in sys_gettimeofday()
28 (void) tz; /* Non-NULL tz is undefined behaviour */ in sys_gettimeofday()
44 int gettimeofday(struct timeval *tv, struct timezone *tz) in gettimeofday() argument
46 return __sysret(sys_gettimeofday(tv, tz)); in gettimeofday()
/linux/drivers/thermal/testing/
H A Dzone.c31 * @tz: Test thermal zone based on this template, if present.
44 struct thermal_zone_device *tz; member
116 if (!tt_zone->tz) in tt_zone_tz_temp_get()
129 if (!tt_zone->tz) in tt_zone_tz_temp_set()
133 thermal_zone_device_update(tt_zone->tz, THERMAL_EVENT_TEMP_SAMPLE); in tt_zone_tz_temp_set()
167 snprintf(f_name, TT_MAX_FILE_NAME_LENGTH, "tz%d", tt_zone->id); in tt_add_tz_work_fn()
232 if (tt_zone->tz) { in tt_zone_unregister_tz()
233 thermal_zone_device_unregister(tt_zone->tz); in tt_zone_unregister_tz()
234 tt_zone->tz = NULL; in tt_zone_unregister_tz()
372 static int tt_zone_get_temp(struct thermal_zone_device *tz, in argument
391 struct thermal_zone_device *tz; tt_zone_register_tz() local
[all...]
/linux/tools/lib/thermal/include/
H A Dthermal.h99 LIBTHERMAL_API int for_each_thermal_zone(struct thermal_zone *tz, cb_tz_t cb, void *arg);
107 LIBTHERMAL_API struct thermal_zone *thermal_zone_find_by_name(struct thermal_zone *tz,
110 LIBTHERMAL_API struct thermal_zone *thermal_zone_find_by_id(struct thermal_zone *tz, int id);
137 struct thermal_zone **tz);
143 struct thermal_zone *tz);
146 struct thermal_zone *tz);
149 struct thermal_zone *tz);
152 struct thermal_zone *tz);
155 struct thermal_zone *tz,
160 struct thermal_zone *tz,
[all...]

123456789