Home
last modified time | relevance | path

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

1234567

/linux-6.3-rc2/drivers/acpi/
A Dthermal.c187 if (!tz) in acpi_thermal_get_temperature()
190 tz->last_temperature = tz->temperature; in acpi_thermal_get_temperature()
209 if (!tz) in acpi_thermal_get_polling_frequency()
225 if (!tz) in acpi_thermal_set_cooling_mode()
504 if (!tz) in thermal_get_temp()
641 tz->temperature, tz->kelvin_offset); in thermal_get_trend()
658 i = tz->trips.passive.tc1 * (tz->temperature - tz->last_temperature) + in thermal_get_trend()
659 tz->trips.passive.tc2 * (tz->temperature - tz->trips.passive.temperature); in thermal_get_trend()
885 if (!tz) in acpi_thermal_notify()
947 if (!tz) in acpi_thermal_get_info()
[all …]
/linux-6.3-rc2/drivers/thermal/
A Dthermal_core.c77 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor()
101 tz->governor->unbind_from_tz(tz); in thermal_set_governor()
312 tz->governor ? tz->governor->throttle(tz, trip) : in handle_non_critical_trips()
341 tz->ops->hot(tz); in handle_critical_trips()
343 tz->ops->critical(tz); in handle_critical_trips()
453 ret = tz->ops->change_mode(tz, mode); in thermal_zone_device_set_mode()
643 dev->tz = tz; in thermal_zone_bind_cooling_device()
1089 tz->ops->unbind(tz, cdev); in thermal_cooling_device_unregister()
1093 if (!tz->tzp || !tz->tzp->tbp) in thermal_cooling_device_unregister()
1125 ret = tz->ops->bind(tz, pos); in bind_tz()
[all …]
A Dthermal_trip.c37 return tz->num_trips; in thermal_zone_get_num_trips()
85 if (tz->prev_low_trip == low && tz->prev_high_trip == high) in __thermal_zone_set_trips()
98 ret = tz->ops->set_trips(tz, low, high); in __thermal_zone_set_trips()
108 if (!tz || trip_id < 0 || trip_id >= tz->num_trips || !trip) in __thermal_zone_get_trip()
111 if (tz->trips) { in __thermal_zone_get_trip()
117 ret = tz->ops->get_trip_hyst(tz, trip_id, &trip->hysteresis); in __thermal_zone_get_trip()
124 ret = tz->ops->get_trip_temp(tz, trip_id, &trip->temperature); in __thermal_zone_get_trip()
128 return tz->ops->get_trip_type(tz, trip_id, &trip->type); in __thermal_zone_get_trip()
151 if (!tz->ops->set_trip_temp && !tz->ops->set_trip_hyst && !tz->trips) in thermal_zone_set_trip()
162 ret = tz->ops->set_trip_temp(tz, trip_id, trip->temperature); in thermal_zone_set_trip()
[all …]
A Dthermal_helpers.c30 if (tz->emul_temperature || !tz->ops->get_trend || in get_tz_trend()
31 tz->ops->get_trend(tz, trip, &trend)) { in get_tz_trend()
32 if (tz->temperature > tz->last_temperature) in get_tz_trend()
34 else if (tz->temperature < tz->last_temperature) in get_tz_trend()
50 mutex_lock(&tz->lock); in get_thermal_instance()
54 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { in get_thermal_instance()
61 mutex_unlock(&tz->lock); in get_thermal_instance()
90 ret = tz->ops->get_temp(tz, temp); in __thermal_zone_get_temp()
130 mutex_lock(&tz->lock); in thermal_zone_get_temp()
205 if (tz && tz->tzp) in thermal_zone_get_slope()
[all …]
A Dthermal_sysfs.c54 mutex_lock(&tz->lock); in mode_show()
286 ret = tz->ops->set_emul_temp(tz, temperature); in emul_temp_store()
305 if (tz->tzp) in sustainable_power_show()
318 if (!tz->tzp) in sustainable_power_store()
442 tz->trip_type_attrs = kcalloc(tz->num_trips, sizeof(*tz->trip_type_attrs), in create_trip_attrs()
447 tz->trip_temp_attrs = kcalloc(tz->num_trips, sizeof(*tz->trip_temp_attrs), in create_trip_attrs()
454 tz->trip_hyst_attrs = kcalloc(tz->num_trips, in create_trip_attrs()
498 attrs[indx + tz->num_trips] = &tz->trip_temp_attrs[indx].attr.attr; in create_trip_attrs()
531 if (!tz) in destroy_trip_attrs()
574 if (!tz) in thermal_zone_destroy_device_groups()
[all …]
A Dgov_power_allocator.c153 k_i = tz->tzp->k_pu / 10; in estimate_pid_constants()
232 p = mul_frac(err < 0 ? tz->tzp->k_po : tz->tzp->k_pu, err); in pid_controller()
644 if (!tz->tzp) { in power_allocator_bind()
645 tz->tzp = kzalloc(sizeof(*tz->tzp), GFP_KERNEL); in power_allocator_bind()
646 if (!tz->tzp) { in power_allocator_bind()
663 estimate_pid_constants(tz, tz->tzp->sustainable_power, in power_allocator_bind()
684 dev_dbg(&tz->device, "Unbinding from thermal zone %d\n", tz->id); in power_allocator_unbind()
687 kfree(tz->tzp); in power_allocator_unbind()
688 tz->tzp = NULL; in power_allocator_unbind()
714 tz->passive = 0; in power_allocator_throttle()
[all …]
A Dthermal_hwmon.c39 struct thermal_zone_device *tz; member
58 struct thermal_zone_device *tz = temp->tz; in temp_input_show() local
76 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local
80 mutex_lock(&tz->lock); in temp_crit_show()
83 ret = tz->ops->get_crit_temp(tz, &temperature); in temp_crit_show()
87 mutex_unlock(&tz->lock); in temp_crit_show()
104 strcpy(type, tz->type); in thermal_hwmon_lookup_by_type()
125 if (temp->tz == tz) { in thermal_hwmon_lookup_temp()
137 return tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, &temp); in thermal_zone_crit_temp_valid()
174 temp->tz = tz; in thermal_add_hwmon_sysfs()
[all …]
A Dthermal_of.c171 struct device_node *np, *tz; in of_thermal_zone_find() local
192 tz = ERR_PTR(-EINVAL); in of_thermal_zone_find()
205 tz = ERR_PTR(ret); in of_thermal_zone_find()
216 tz = ERR_PTR(-ENODEV); in of_thermal_zone_find()
219 return tz; in of_thermal_zone_find()
448 thermal_zone_device_disable(tz); in thermal_of_zone_unregister()
479 struct thermal_zone_device *tz; in thermal_of_zone_register() local
528 if (IS_ERR(tz)) { in thermal_of_zone_register()
529 ret = PTR_ERR(tz); in thermal_of_zone_register()
537 tz->type, tz->id, ret); in thermal_of_zone_register()
[all …]
A Dgov_fair_share.c22 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument
27 for (count = 0; count < tz->num_trips; count++) { in get_trip_level()
28 __thermal_zone_get_trip(tz, count, &trip); in get_trip_level()
29 if (tz->temperature < trip.temperature) in get_trip_level()
38 trace_thermal_zone_trip(tz, count - 1, trip.type); in get_trip_level()
43 static long get_target_state(struct thermal_zone_device *tz, in get_target_state() argument
73 int cur_trip_level = get_trip_level(tz); in fair_share_throttle()
75 lockdep_assert_held(&tz->lock); in fair_share_throttle()
77 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in fair_share_throttle()
85 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in fair_share_throttle()
[all …]
A Dgov_bang_bang.c22 ret = __thermal_zone_get_trip(tz, trip_id, &trip); in thermal_zone_trip_update()
29 dev_info_once(&tz->device, in thermal_zone_trip_update()
30 "Zero hysteresis value for thermal zone %s\n", tz->type); in thermal_zone_trip_update()
32 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in thermal_zone_trip_update()
33 trip_id, trip.temperature, tz->temperature, in thermal_zone_trip_update()
36 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update()
55 if (instance->target == 0 && tz->temperature >= trip.temperature) in thermal_zone_trip_update()
58 tz->temperature <= trip.temperature - trip.hysteresis) in thermal_zone_trip_update()
104 lockdep_assert_held(&tz->lock); in bang_bang_control()
106 ret = thermal_zone_trip_update(tz, trip); in bang_bang_control()
[all …]
A Dgov_step_wise.c95 tz->passive += value; in update_passive_instance()
106 __thermal_zone_get_trip(tz, trip_id, &trip); in thermal_zone_trip_update()
108 trend = get_tz_trend(tz, trip_id); in thermal_zone_trip_update()
110 if (tz->temperature >= trip.temperature) { in thermal_zone_trip_update()
112 trace_thermal_zone_trip(tz, trip_id, trip.type); in thermal_zone_trip_update()
118 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update()
133 update_passive_instance(tz, trip.type, 1); in thermal_zone_trip_update()
137 update_passive_instance(tz, trip.type, -1); in thermal_zone_trip_update()
161 lockdep_assert_held(&tz->lock); in step_wise_throttle()
163 thermal_zone_trip_update(tz, trip); in step_wise_throttle()
[all …]
A Dgov_user_space.c18 static int user_space_bind(struct thermal_zone_device *tz) in user_space_bind() argument
32 static int notify_user_space(struct thermal_zone_device *tz, int trip) in notify_user_space() argument
37 lockdep_assert_held(&tz->lock); in notify_user_space()
39 thermal_prop[0] = kasprintf(GFP_KERNEL, "NAME=%s", tz->type); in notify_user_space()
40 thermal_prop[1] = kasprintf(GFP_KERNEL, "TEMP=%d", tz->temperature); in notify_user_space()
42 thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", tz->notify_event); in notify_user_space()
44 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, thermal_prop); in notify_user_space()
A Dthermal_hwmon.h19 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
20 int devm_thermal_add_hwmon_sysfs(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 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
A Ddb8500_thermal.c55 struct thermal_zone_device *tz; member
61 static int db8500_thermal_get_temp(struct thermal_zone_device *tz, int *temp) in db8500_thermal_get_temp() argument
63 struct db8500_thermal_zone *th = tz->devdata; in db8500_thermal_get_temp()
117 dev_dbg(&th->tz->device, in prcmu_low_irq_handler()
120 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED); in prcmu_low_irq_handler()
139 dev_dbg(&th->tz->device, in prcmu_high_irq_handler()
145 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED); in prcmu_high_irq_handler()
185 th->tz = devm_thermal_of_zone_register(dev, 0, th, &thdev_ops); in db8500_thermal_probe()
186 if (IS_ERR(th->tz)) { in db8500_thermal_probe()
188 return PTR_ERR(th->tz); in db8500_thermal_probe()
A Dthermal_core.h75 int get_tz_trend(struct thermal_zone_device *tz, int trip);
78 get_thermal_instance(struct thermal_zone_device *tz,
90 struct thermal_zone_device *tz; member
116 void __thermal_zone_device_update(struct thermal_zone_device *tz,
120 void __thermal_zone_set_trips(struct thermal_zone_device *tz);
121 int __thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
123 int __thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
146 int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
/linux-6.3-rc2/tools/thermal/thermal-engine/
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-6.3-rc2/tools/lib/thermal/
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 …]
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-6.3-rc2/tools/testing/selftests/timers/
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-6.3-rc2/include/linux/
A Dthermal.h204 int (*bind_to_tz)(struct thermal_zone_device *tz);
205 void (*unbind_from_tz)(struct thermal_zone_device *tz);
206 int (*throttle)(struct thermal_zone_device *tz, int trip);
241 int (*match) (struct thermal_zone_device *tz,
332 struct thermal_zone_device *tz) in devm_thermal_of_zone_unregister() argument
390 int thermal_zone_get_slope(struct thermal_zone_device *tz);
391 int thermal_zone_get_offset(struct thermal_zone_device *tz);
404 struct thermal_zone_device *tz) in thermal_zone_device_unregister() argument
430 struct thermal_zone_device *tz, int *temp) in thermal_zone_get_temp() argument
433 struct thermal_zone_device *tz) in thermal_zone_get_slope() argument
[all …]
/linux-6.3-rc2/tools/thermal/thermometer/
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-6.3-rc2/drivers/thermal/broadcom/
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()
262 data->tz = tz; in bcm2835_thermal_probe()
270 tz->tzp->no_hwmon = false; in bcm2835_thermal_probe()
279 thermal_of_zone_unregister(tz); in bcm2835_thermal_probe()
289 struct thermal_zone_device *tz = data->tz; in bcm2835_thermal_remove() local
[all …]
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 = tz->devdata; 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()
/linux-6.3-rc2/fs/isofs/
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-6.3-rc2/include/trace/events/
A Dthermal.h26 TP_PROTO(struct thermal_zone_device *tz),
28 TP_ARGS(tz),
31 __string(thermal_zone, tz->type)
38 __assign_str(thermal_zone, tz->type);
39 __entry->id = tz->id;
40 __entry->temp_prev = tz->last_temperature;
41 __entry->temp = tz->temperature;
73 TP_ARGS(tz, trip, trip_type),
76 __string(thermal_zone, tz->type)
83 __assign_str(thermal_zone, tz->type);
[all …]

Completed in 117 milliseconds

1234567