Lines Matching refs:tz
40 struct thermal_zone_device *tz;
59 struct thermal_zone_device *tz = temp->tz;
61 ret = thermal_zone_get_temp(tz, &temperature);
77 struct thermal_zone_device *tz = temp->tz;
81 mutex_lock(&tz->lock);
83 if (device_is_registered(&tz->device))
84 ret = tz->ops->get_crit_temp(tz, &temperature);
88 mutex_unlock(&tz->lock);
98 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz)
105 strcpy(type, tz->type);
120 const struct thermal_zone_device *tz)
126 if (temp->tz == tz) {
135 static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz)
138 return tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, &temp);
141 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
148 hwmon = thermal_hwmon_lookup_by_type(tz);
159 strscpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
161 hwmon->device = hwmon_device_register_for_thermal(&tz->device,
175 temp->tz = tz;
188 if (thermal_zone_crit_temp_valid(tz)) {
224 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
229 hwmon = thermal_hwmon_lookup_by_type(tz);
232 dev_dbg(&tz->device, "hwmon device lookup failed!\n");
236 temp = thermal_hwmon_lookup_temp(hwmon, tz);
239 dev_dbg(&tz->device, "temperature input lookup failed!\n");
244 if (thermal_zone_crit_temp_valid(tz))
267 int devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz)
279 ret = thermal_add_hwmon_sysfs(tz);
286 *ptr = tz;