Home
last modified time | relevance | path

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

12345678

/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->governor = NULL; in bind_previous_governor()
88 * @tz: a valid pointer to a struct thermal_zone_device
91 * Change the governor of thermal zone @tz.
95 static int thermal_set_governor(struct thermal_zone_device *tz, in thermal_set_governor() argument
[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 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()
70 * @tz: a valid pointer to a struct thermal_zone_device
[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
[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
99 strcpy(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 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()
52 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_show() local
54 guard(thermal_zone)(tz); in mode_show()
56 if (tz->mode == THERMAL_DEVICE_ENABLED) in mode_show()
66 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_store() local
70 result = thermal_zone_device_enable(tz); in mode_store()
72 result = thermal_zone_device_disable(tz); in mode_store()
[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->prev_high_trip == high) in thermal_zone_set_trips()
67 tz->prev_low_trip = low; in thermal_zone_set_trips()
[all …]
H A Dthermal_netlink.c351 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 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
[all …]
H A Dgov_bang_bang.c38 * @tz: thermal_zone_device
64 static void bang_bang_control(struct thermal_zone_device *tz, in bang_bang_control() argument
71 lockdep_assert_held(&tz->lock); in bang_bang_control()
73 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in bang_bang_control()
74 thermal_zone_trip_id(tz, trip), trip->temperature, in bang_bang_control()
75 tz->temperature, trip->hysteresis); in bang_bang_control()
81 static void bang_bang_manage(struct thermal_zone_device *tz) in bang_bang_manage() argument
87 if (tz->governor_data) in bang_bang_manage()
90 for_each_trip_desc(tz, td) { in bang_bang_manage()
103 turn_on = tz->temperature >= td->threshold; in bang_bang_manage()
[all …]
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, now); in thermal_debug_tz_trip_up()
[all …]
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 notify_user_space(struct thermal_zone_device *tz, in notify_user_space() argument
40 lockdep_assert_held(&tz->lock); in notify_user_space()
42 thermal_prop[0] = kasprintf(GFP_KERNEL, "NAME=%s", tz->type); in notify_user_space()
43 thermal_prop[1] = kasprintf(GFP_KERNEL, "TEMP=%d", tz->temperature); in notify_user_space()
45 thermal_zone_trip_id(tz, trip)); in notify_user_space()
46 thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", tz->notify_event); in notify_user_space()
48 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, thermal_prop); in notify_user_space()
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()
277 static bool thermal_of_should_bind(struct thermal_zone_device *tz, in thermal_of_should_bind() argument
285 tz_np = thermal_of_zone_get_by_name(tz); in thermal_of_should_bind()
287 pr_err("Failed to get node tz by name\n"); in thermal_of_should_bind()
331 * @tz: a pointer to the thermal zone structure
333 static void thermal_of_zone_unregister(struct thermal_zone_device *tz) in thermal_of_zone_unregister() argument
335 thermal_zone_device_disable(tz); in thermal_of_zone_unregister()
336 thermal_zone_device_unregister(tz); in thermal_of_zone_unregister()
363 struct thermal_zone_device *tz; in thermal_of_zone_register() local
[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_core.h55 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,
226 int get_tz_trend(struct thermal_zone_device *tz, const struct thermal_trip *trip);
262 void __thermal_zone_device_update(struct thermal_zone_device *tz,
264 void thermal_zone_device_critical_reboot(struct thermal_zone_device *tz);
265 void thermal_governor_update_tz(struct thermal_zone_device *tz,
277 void thermal_zone_set_trips(struct thermal_zone_device *tz, int low, int high);
[all …]
H A Dthermal_hwmon.h19 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
20 int devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz);
21 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
24 thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_add_hwmon_sysfs() argument
30 devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz) in devm_thermal_add_hwmon_sysfs() argument
36 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_remove_hwmon_sysfs() argument
/linux/drivers/acpi/
H A Dthermal.c59 #define ACPI_THERMAL_TRIPS_EXCEPTION(tz, str) \ argument
61 acpi_handle_info(tz->device->handle, \
128 static int acpi_thermal_get_temperature(struct acpi_thermal *tz) in acpi_thermal_get_temperature() argument
133 if (!tz) in acpi_thermal_get_temperature()
136 tz->last_temp_dk = tz->temp_dk; in acpi_thermal_get_temperature()
138 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); in acpi_thermal_get_temperature()
142 tz->temp_dk = tmp; in acpi_thermal_get_temperature()
144 acpi_handle_debug(tz->device->handle, "Temperature is %lu dK\n", in acpi_thermal_get_temperature()
145 tz->temp_dk); in acpi_thermal_get_temperature()
150 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 Dthermal-engine.c37 struct thermal_zone *tz; member
57 static int show_temp(struct thermal_zone *tz, __maybe_unused void *arg)
59 thermal_cmd_get_temp(arg, tz); in show_governor()
61 INFO("temperature: %d\n", tz->temp); in show_governor()
66 static int show_governor(struct thermal_zone *tz, __maybe_unused void *arg)
68 thermal_cmd_get_governor(arg, tz); in show_tz()
70 INFO("governor: '%s'\n", tz->governor); in show_tz()
75 static int show_tz(struct thermal_zone *tz, __maybe_unused void *arg) in show_tz()
77 INFO("thermal zone '%s', id=%d\n", tz->name, tz in show_tz()
49 show_temp(struct thermal_zone * tz,__maybe_unused void * arg) show_temp() argument
58 show_governor(struct thermal_zone * tz,__maybe_unused void * arg) show_governor() argument
67 show_tz(struct thermal_zone * tz,__maybe_unused void * arg) show_tz() argument
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...]
/linux/tools/lib/thermal/
H A Dthermal.c48 int for_each_thermal_zone(struct thermal_zone *tz, cb_tz_t cb, void *arg) in thermal_zone_find_by_name()
52 if (!tz) in thermal_zone_find_by_name()
55 for (i = 0; tz[i].id != -1; i++) in thermal_zone_find_by_name()
56 ret |= cb(&tz[i], arg); in thermal_zone_find_by_name()
61 struct thermal_zone *thermal_zone_find_by_name(struct thermal_zone *tz, in thermal_zone_find_by_name()
66 if (!tz || !name) in thermal_zone_find_by_id()
69 for (i = 0; tz[i].id != -1; i++) { in thermal_zone_find_by_id()
70 if (!strcmp(tz[i].name, name)) in thermal_zone_find_by_id()
71 return &tz[i]; in thermal_zone_find_by_id()
77 struct thermal_zone *thermal_zone_find_by_id(struct thermal_zone *tz, in in thermal_zone_find_by_id()
34 for_each_thermal_zone(struct thermal_zone * tz,cb_tz_t cb,void * arg) for_each_thermal_zone() argument
47 thermal_zone_find_by_name(struct thermal_zone * tz,const char * name) thermal_zone_find_by_name() argument
63 thermal_zone_find_by_id(struct thermal_zone * tz,int id) thermal_zone_find_by_id() 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...]
H A Dcommands.c44 static int parse_tz_get(struct genl_info *info, struct thermal_zone **tz) in parse_tz_get()
73 *tz = __tz; in parse_cdev_get()
118 static int parse_tz_get_trip(struct genl_info *info, struct thermal_zone *tz) in parse_tz_get_trip()
151 tz->trip = __tt; in parse_tz_get_temp()
156 static int parse_tz_get_temp(struct genl_info *info, struct thermal_zone *tz) in parse_tz_get_temp()
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_gov()
172 static int parse_tz_get_gov(struct genl_info *info, struct thermal_zone *tz) in parse_tz_get_gov()
179 if (tz->id != id) in parse_tz_get_gov()
183 nla_strlcpy(tz in parse_tz_get_gov()
38 parse_tz_get(struct genl_info * info,struct thermal_zone ** tz) parse_tz_get() argument
112 parse_tz_get_trip(struct genl_info * info,struct thermal_zone * tz) parse_tz_get_trip() argument
150 parse_tz_get_temp(struct genl_info * info,struct thermal_zone * tz) parse_tz_get_temp() argument
166 parse_tz_get_gov(struct genl_info * info,struct thermal_zone * tz) parse_tz_get_gov() argument
290 thermal_cmd_get_tz(struct thermal_handler * th,struct thermal_zone ** tz) thermal_cmd_get_tz() argument
302 thermal_cmd_get_trip(struct thermal_handler * th,struct thermal_zone * tz) thermal_cmd_get_trip() argument
308 thermal_cmd_get_governor(struct thermal_handler * th,struct thermal_zone * tz) thermal_cmd_get_governor() argument
313 thermal_cmd_get_temp(struct thermal_handler * th,struct thermal_zone * tz) thermal_cmd_get_temp() argument
[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.tz_minuteswest; in get_tz_min()
50 struct timezone tz; in 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()
343 struct tz *tz = arg; timer_temperature_callback() local
[all...]
/linux/include/linux/
H A Dthermal.h201 void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz);
213 struct thermal_zone_device *tz) in devm_thermal_of_zone_unregister() argument
218 int for_each_thermal_trip(struct thermal_zone_device *tz,
221 int thermal_zone_for_each_trip(struct thermal_zone_device *tz,
224 void thermal_zone_set_trip_temp(struct thermal_zone_device *tz,
227 int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp);
245 void thermal_zone_device_unregister(struct thermal_zone_device *tz);
268 int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
269 int thermal_zone_get_slope(struct thermal_zone_device *tz);
270 int thermal_zone_get_offset(struct thermal_zone_device *tz);
[all …]
/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, int *temp) in tt_zone_get_temp() argument
[all …]
/linux/fs/isofs/
H A Dutil.c21 int year, month, day, hour, minute, second, tz; in iso_date() local
30 if (flag == 0) tz = p[6]; /* High sierra has no time zone */ in iso_date()
31 else tz = 0; in iso_date()
39 if (tz & 0x80) in iso_date()
40 tz |= (-1 << 8); in iso_date()
67 if (-52 <= tz && tz <= 52) in iso_date()
68 crtime -= tz * 15 * 60; in iso_date()
/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...]

12345678