Lines Matching refs:tz
39 struct thermal_zone_device *tz;
58 struct thermal_zone_device *tz = temp->tz;
60 ret = thermal_zone_get_temp(tz, &temperature);
76 struct thermal_zone_device *tz = temp->tz;
80 ret = tz->ops->get_crit_temp(tz, &temperature);
89 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz)
96 strcpy(type, tz->type);
111 const struct thermal_zone_device *tz)
117 if (temp->tz == tz) {
126 static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz)
129 return tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, &temp);
132 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
139 hwmon = thermal_hwmon_lookup_by_type(tz);
150 strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
152 hwmon->device = hwmon_device_register_with_info(&tz->device, hwmon->type,
166 temp->tz = tz;
179 if (thermal_zone_crit_temp_valid(tz)) {
216 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
221 hwmon = thermal_hwmon_lookup_by_type(tz);
224 dev_dbg(&tz->device, "hwmon device lookup failed!\n");
228 temp = thermal_hwmon_lookup_temp(hwmon, tz);
231 dev_dbg(&tz->device, "temperature input lookup failed!\n");
236 if (thermal_zone_crit_temp_valid(tz))
259 int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
269 ret = thermal_add_hwmon_sysfs(tz);
275 *ptr = tz;
276 devres_add(&tz->device, ptr);