Home
last modified time | relevance | path

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

12345678

/linux/drivers/thermal/
H A Dthermal_core.c76 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor()
100 tz->governor->unbind_from_tz(tz); in thermal_set_governor()
319 tz->governor->update_tz(tz, reason); in thermal_governor_update_tz()
356 tz->ops.critical(tz); in handle_critical_trips()
358 tz->ops.hot(tz); in handle_critical_trips()
431 tz->last_temperature = tz->temperature; in update_temperature()
554 ret = tz->ops.change_mode(tz, mode); in thermal_zone_device_set_mode()
750 dev->tz = tz; in thermal_bind_cdev_to_trip()
1256 tz->ops.unbind(tz, cdev); in thermal_cooling_device_unregister()
1276 ret = tz->ops.bind(tz, pos); in bind_tz()
[all …]
H A Dthermal_trip.c19 for_each_trip_desc(tz, td) { in for_each_thermal_trip()
35 mutex_lock(&tz->lock); in thermal_zone_for_each_trip()
37 mutex_unlock(&tz->lock); in thermal_zone_for_each_trip()
45 return tz->num_trips; in thermal_zone_get_num_trips()
72 if (!tz->ops.set_trips) in __thermal_zone_set_trips()
90 if (tz->prev_low_trip == low && tz->prev_high_trip == high) in __thermal_zone_set_trips()
96 dev_dbg(&tz->device, in __thermal_zone_set_trips()
103 ret = tz->ops.set_trips(tz, low, high); in __thermal_zone_set_trips()
111 if (!tz || trip_id < 0 || trip_id >= tz->num_trips || !trip) in __thermal_zone_get_trip()
124 mutex_lock(&tz->lock); in thermal_zone_get_trip()
[all …]
H A Dthermal_helpers.c29 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()
50 mutex_lock(&tz->lock); in get_thermal_instance()
56 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { in get_thermal_instance()
63 mutex_unlock(&tz->lock); in get_thermal_instance()
91 ret = tz->ops.get_temp(tz, temp); in __thermal_zone_get_temp()
135 mutex_lock(&tz->lock); in thermal_zone_get_temp()
216 if (tz && tz->tzp) in thermal_zone_get_slope()
[all …]
H A Dthermal_sysfs.c54 mutex_lock(&tz->lock); in mode_show()
127 ret = tz->ops.set_trip_temp(tz, trip_id, temp); in trip_point_temp_store()
249 ret = tz->ops.set_emul_temp(tz, temperature); in emul_temp_store()
267 if (tz->tzp) in sustainable_power_show()
280 if (!tz->tzp) in sustainable_power_store()
403 tz->trip_type_attrs = kcalloc(tz->num_trips, sizeof(*tz->trip_type_attrs), in create_trip_attrs()
408 tz->trip_temp_attrs = kcalloc(tz->num_trips, sizeof(*tz->trip_temp_attrs), in create_trip_attrs()
415 tz->trip_hyst_attrs = kcalloc(tz->num_trips, in create_trip_attrs()
493 if (!tz) in destroy_trip_attrs()
535 if (!tz) in thermal_zone_destroy_device_groups()
[all …]
H A Dgov_power_allocator.c178 k_i = tz->tzp->k_pu / 10; in estimate_pid_constants()
257 p = mul_frac(err < 0 ? tz->tzp->k_po : tz->tzp->k_pu, err); in pid_controller()
699 if (!tz->tzp) { in power_allocator_bind()
700 tz->tzp = kzalloc(sizeof(*tz->tzp), GFP_KERNEL); in power_allocator_bind()
701 if (!tz->tzp) { in power_allocator_bind()
715 estimate_pid_constants(tz, tz->tzp->sustainable_power, in power_allocator_bind()
736 dev_dbg(&tz->device, "Unbinding from thermal zone %d\n", tz->id); in power_allocator_unbind()
739 kfree(tz->tzp); in power_allocator_unbind()
740 tz->tzp = NULL; in power_allocator_unbind()
744 kfree(tz->governor_data); in power_allocator_unbind()
[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
77 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local
81 mutex_lock(&tz->lock); in temp_crit_show()
83 ret = tz->ops.get_crit_temp(tz, &temperature); in temp_crit_show()
85 mutex_unlock(&tz->lock); in temp_crit_show()
102 strcpy(type, tz->type); in thermal_hwmon_lookup_by_type()
123 if (temp->tz == tz) { in thermal_hwmon_lookup_temp()
135 return tz->ops.get_crit_temp && !tz->ops.get_crit_temp(tz, &temp); in thermal_zone_crit_temp_valid()
172 temp->tz = tz; in thermal_add_hwmon_sysfs()
[all …]
H A Dthermal_netlink.h37 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,
62 static inline int thermal_notify_tz_create(const struct thermal_zone_device *tz) in thermal_notify_tz_create() argument
77 static inline int thermal_notify_tz_delete(const struct thermal_zone_device *tz) in thermal_notify_tz_delete() argument
[all …]
H A Dthermal_of.c174 struct device_node *np, *tz; in of_thermal_zone_find() local
195 tz = ERR_PTR(-EINVAL); in of_thermal_zone_find()
208 tz = ERR_PTR(ret); in of_thermal_zone_find()
219 tz = ERR_PTR(-ENODEV); in of_thermal_zone_find()
222 return tz; in of_thermal_zone_find()
447 thermal_zone_device_disable(tz); in thermal_of_zone_unregister()
475 struct thermal_zone_device *tz; in thermal_of_zone_register() local
516 if (IS_ERR(tz)) { in thermal_of_zone_register()
517 ret = PTR_ERR(tz); in thermal_of_zone_register()
527 tz->type, tz->id, ret); in thermal_of_zone_register()
[all …]
H A Dgov_fair_share.c18 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
89 divisor = tz->num_trips; in fair_share_throttle()
104 static void fair_share_manage(struct thermal_zone_device *tz) in fair_share_manage() argument
106 int trip_level = get_trip_level(tz); in fair_share_manage()
109 lockdep_assert_held(&tz->lock); in fair_share_manage()
111 for_each_trip_desc(tz, td) { in fair_share_manage()
[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_trip_up(struct thermal_zone_device *tz,
12 void thermal_debug_tz_trip_down(struct thermal_zone_device *tz,
14 void thermal_debug_update_trip_stats(struct thermal_zone_device *tz);
21 static inline void thermal_debug_tz_add(struct thermal_zone_device *tz) {} in thermal_debug_tz_add() argument
22 static inline void thermal_debug_tz_remove(struct thermal_zone_device *tz) {} in thermal_debug_tz_remove() argument
23 static inline void thermal_debug_tz_trip_up(struct thermal_zone_device *tz, in thermal_debug_tz_trip_up() argument
25 static inline void thermal_debug_tz_trip_down(struct thermal_zone_device *tz, in thermal_debug_tz_trip_down() argument
27 static inline void thermal_debug_update_trip_stats(struct thermal_zone_device *tz) {} in thermal_debug_update_trip_stats() argument
H A Dthermal_netlink.c306 struct param p = { .tz_id = tz->id, .name = tz->type }; in thermal_notify_tz_create()
456 if (!tz) in thermal_genl_cmd_tz_get_trip()
463 mutex_lock(&tz->lock); in thermal_genl_cmd_tz_get_trip()
465 for_each_trip_desc(tz, td) { in thermal_genl_cmd_tz_get_trip()
476 mutex_unlock(&tz->lock); in thermal_genl_cmd_tz_get_trip()
483 mutex_unlock(&tz->lock); in thermal_genl_cmd_tz_get_trip()
500 if (!tz) in thermal_genl_cmd_tz_get_temp()
526 if (!tz) in thermal_genl_cmd_tz_get_gov()
529 mutex_lock(&tz->lock); in thermal_genl_cmd_tz_get_gov()
533 tz->governor->name)) in thermal_genl_cmd_tz_get_gov()
[all …]
H A Dthermal_core.h41 int (*bind_to_tz)(struct thermal_zone_device *tz);
42 void (*unbind_from_tz)(struct thermal_zone_device *tz);
43 void (*trip_crossed)(struct thermal_zone_device *tz,
46 void (*manage)(struct thermal_zone_device *tz);
47 void (*update_tz)(struct thermal_zone_device *tz,
191 get_thermal_instance(struct thermal_zone_device *tz,
203 struct thermal_zone_device *tz; member
243 void __thermal_zone_set_trips(struct thermal_zone_device *tz);
244 int thermal_zone_trip_id(const struct thermal_zone_device *tz,
246 void thermal_zone_trip_updated(struct thermal_zone_device *tz,
[all …]
H A Dgov_step_wise.c64 static void thermal_zone_trip_update(struct thermal_zone_device *tz, in thermal_zone_trip_update() argument
68 enum thermal_trend trend = get_tz_trend(tz, trip); in thermal_zone_trip_update()
69 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_zone_trip_update()
73 if (tz->temperature >= trip_threshold) { in thermal_zone_trip_update()
75 trace_thermal_zone_trip(tz, trip_id, trip->type); in thermal_zone_trip_update()
81 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update()
104 static void step_wise_manage(struct thermal_zone_device *tz) in step_wise_manage() argument
109 lockdep_assert_held(&tz->lock); in step_wise_manage()
118 for_each_trip_desc(tz, td) { in step_wise_manage()
126 thermal_zone_trip_update(tz, trip, td->threshold); in step_wise_manage()
[all …]
H A Dgov_user_space.c18 static int user_space_bind(struct thermal_zone_device *tz) in user_space_bind() argument
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_debugfs.c152 struct thermal_zone_device *tz; member
565 for (i = 0; i < tz->num_trips; i++) { in thermal_debugfs_tz_event_alloc()
777 struct thermal_zone_device *tz = thermal_dbg->tz_dbg.tz; in tze_seq_show() local
801 for_each_trip_desc(tz, td) { in tze_seq_show()
874 tz_dbg->tz = tz; in thermal_debug_tz_add()
887 tz->debugfs = thermal_dbg; in thermal_debug_tz_add()
897 mutex_lock(&tz->lock); in thermal_debug_tz_remove()
899 thermal_dbg = tz->debugfs; in thermal_debug_tz_remove()
901 mutex_unlock(&tz->lock); in thermal_debug_tz_remove()
905 tz->debugfs = NULL; in thermal_debug_tz_remove()
[all …]
/linux/drivers/acpi/
H A Dthermal.c133 if (!tz) in acpi_thermal_get_temperature()
136 tz->last_temp_dk = tz->temp_dk; in acpi_thermal_get_temperature()
155 if (!tz) in acpi_thermal_get_polling_frequency()
295 struct acpi_thermal *tz = atd->tz; in acpi_thermal_adjust_trip() local
477 if (!tz) in thermal_get_temp()
506 t = tz->trips.passive.tc1 * (tz->temp_dk - in thermal_get_trend()
508 tz->trips.passive.tc2 * (tz->temp_dk - in thermal_get_trend()
520 t = acpi_thermal_temp(tz, tz->temp_dk); in thermal_get_trend()
716 if (!tz) in acpi_thermal_notify()
835 if (!tz) in acpi_thermal_add()
[all …]
/linux/tools/thermal/thermal-engine/
H A Dthermal-engine.c37 struct thermal_zone *tz; member
69 INFO("thermal zone '%s', id=%d\n", tz->name, tz->id); in show_tz()
73 show_temp(tz, arg); in show_tz()
97 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in tz_disable() local
107 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in tz_enable() local
117 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in trip_high() local
128 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in trip_low() local
155 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in trip_change() local
191 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in gov_change() local
193 INFO("%s: governor changed %s -> %s\n", tz->name, tz->governor, name); in gov_change()
[all …]
/linux/tools/lib/thermal/
H A Dthermal.c38 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()
52 if (!tz || !name) 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()
67 if (!tz || id < 0) in thermal_zone_find_by_id()
71 if (tz[i].id == id) in thermal_zone_find_by_id()
72 return &tz[i]; in thermal_zone_find_by_id()
91 struct thermal_zone *tz; in thermal_zone_discover() local
[all …]
H A Dcommands.c67 *tz = __tz; in parse_tz_get()
145 tz->trip = __tt; in parse_tz_get_trip()
157 if (tz->id != id) in parse_tz_get_temp()
161 tz->temp = nla_get_u32(info->attrs[THERMAL_GENL_ATTR_TZ_TEMP]); in parse_tz_get_temp()
173 if (tz->id != id) in parse_tz_get_gov()
177 nla_strlcpy(tz->governor, in parse_tz_get_gov()
293 NLM_F_DUMP | NLM_F_ACK, tz); in thermal_cmd_get_tz()
304 return thermal_genl_auto(th, tz->id, THERMAL_GENL_CMD_TZ_GET_TRIP, in thermal_cmd_get_trip()
305 0, tz); in thermal_cmd_get_trip()
310 return thermal_genl_auto(th, tz->id, THERMAL_GENL_CMD_TZ_GET_GOV, 0, tz); in thermal_cmd_get_governor()
[all …]
/linux/tools/testing/selftests/timers/
H A Dset-tz.c30 struct timezone tz; in set_tz() local
32 tz.tz_minuteswest = min; in set_tz()
33 tz.tz_dsttime = dst; 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()
54 gettimeofday(&tv, &tz); in get_tz_dst()
[all …]
/linux/include/linux/
H A Dthermal.h196 struct thermal_zone_device *tz) in devm_thermal_of_zone_unregister() argument
205 int for_each_thermal_trip(struct thermal_zone_device *tz,
208 int thermal_zone_for_each_trip(struct thermal_zone_device *tz,
211 int thermal_zone_get_num_trips(struct thermal_zone_device *tz);
212 void thermal_zone_set_trip_temp(struct thermal_zone_device *tz,
239 int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
270 int thermal_zone_get_slope(struct thermal_zone_device *tz);
271 int thermal_zone_get_offset(struct thermal_zone_device *tz);
320 struct thermal_zone_device *tz, int *temp) in thermal_zone_get_temp() argument
323 struct thermal_zone_device *tz) in thermal_zone_get_slope() argument
[all …]
/linux/tools/thermal/thermometer/
H A Dthermometer.c57 struct tz { struct
66 struct tz *tz; argument
105 config_setting_t *tz; in configuration_init() local
128 if (!tz) { in configuration_init()
133 length = config_setting_length(tz); in configuration_init()
271 thermometer->tz = realloc(thermometer->tz, in thermometer_add_tz()
273 if (!thermometer->tz) { in thermometer_add_tz()
343 struct tz *tz = arg; in timer_temperature_callback() local
388 thermometer->tz[i].file_out = f; in thermometer_start()
403 thermometer->tz[i].name, thermometer->tz[i].polling); in thermometer_start()
[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/drivers/thermal/broadcom/
H A Dbcm2835_thermal.c67 struct thermal_zone_device *tz; member
103 thermal_zone_get_offset(data->tz), in bcm2835_thermal_get_temp()
104 thermal_zone_get_slope(data->tz)); in bcm2835_thermal_get_temp()
167 struct thermal_zone_device *tz; in bcm2835_thermal_probe() local
209 if (IS_ERR(tz)) { in bcm2835_thermal_probe()
210 err = PTR_ERR(tz); in bcm2835_thermal_probe()
228 slope = thermal_zone_get_slope(tz); in bcm2835_thermal_probe()
229 offset = thermal_zone_get_offset(tz); in bcm2835_thermal_probe()
234 err = thermal_zone_get_trip(tz, 0, &trip); in bcm2835_thermal_probe()
262 data->tz = tz; in bcm2835_thermal_probe()
[all …]
H A Dns-thermal.c17 static int ns_thermal_get_temp(struct thermal_zone_device *tz, int *temp) in ns_thermal_get_temp() argument
19 void __iomem *pvtmon = thermal_zone_device_priv(tz); in ns_thermal_get_temp()
20 int offset = thermal_zone_get_offset(tz); in ns_thermal_get_temp()
21 int slope = thermal_zone_get_slope(tz); in ns_thermal_get_temp()
48 struct thermal_zone_device *tz; in ns_thermal_probe() local
55 tz = devm_thermal_of_zone_register(dev, 0, in ns_thermal_probe()
58 if (IS_ERR(tz)) { in ns_thermal_probe()
60 return PTR_ERR(tz); in ns_thermal_probe()

12345678