Lines Matching refs:tz
37 struct thermal_zone_device *tz; member
56 struct thermal_zone_device *tz = temp->tz; in temp_input_show() local
58 ret = thermal_zone_get_temp(tz, &temperature); in temp_input_show()
74 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local
78 ret = tz->ops->get_crit_temp(tz, &temperature); in temp_crit_show()
87 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) in thermal_hwmon_lookup_by_type() argument
94 strcpy(type, tz->type); in thermal_hwmon_lookup_by_type()
109 const struct thermal_zone_device *tz) in thermal_hwmon_lookup_temp() argument
115 if (temp->tz == tz) { in thermal_hwmon_lookup_temp()
124 static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz) in thermal_zone_crit_temp_valid() argument
127 return tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, &temp); in thermal_zone_crit_temp_valid()
130 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_add_hwmon_sysfs() argument
137 hwmon = thermal_hwmon_lookup_by_type(tz); in thermal_add_hwmon_sysfs()
148 strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH); in thermal_add_hwmon_sysfs()
150 hwmon->device = hwmon_device_register_with_info(&tz->device, hwmon->type, in thermal_add_hwmon_sysfs()
164 temp->tz = tz; in thermal_add_hwmon_sysfs()
177 if (thermal_zone_crit_temp_valid(tz)) { in thermal_add_hwmon_sysfs()
214 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_remove_hwmon_sysfs() argument
219 hwmon = thermal_hwmon_lookup_by_type(tz); in thermal_remove_hwmon_sysfs()
222 dev_dbg(&tz->device, "hwmon device lookup failed!\n"); in thermal_remove_hwmon_sysfs()
226 temp = thermal_hwmon_lookup_temp(hwmon, tz); in thermal_remove_hwmon_sysfs()
229 dev_dbg(&tz->device, "temperature input lookup failed!\n"); in thermal_remove_hwmon_sysfs()
234 if (thermal_zone_crit_temp_valid(tz)) in thermal_remove_hwmon_sysfs()