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