Lines Matching full:temp

56 	struct thermal_hwmon_temp *temp  in temp_input_show()  local
59 struct thermal_zone_device *tz = temp->tz; in temp_input_show()
74 struct thermal_hwmon_temp *temp in temp_crit_show() local
77 struct thermal_zone_device *tz = temp->tz; in temp_crit_show()
119 struct thermal_hwmon_temp *temp; in thermal_hwmon_lookup_temp() local
122 list_for_each_entry(temp, &hwmon->tz_list, hwmon_node) in thermal_hwmon_lookup_temp()
123 if (temp->tz == tz) { in thermal_hwmon_lookup_temp()
125 return temp; in thermal_hwmon_lookup_temp()
134 int temp; in thermal_zone_crit_temp_valid() local
135 return tz->ops.get_crit_temp && !tz->ops.get_crit_temp(tz, &temp); in thermal_zone_crit_temp_valid()
141 struct thermal_hwmon_temp *temp; in thermal_add_hwmon_sysfs() local
166 temp = kzalloc(sizeof(*temp), GFP_KERNEL); in thermal_add_hwmon_sysfs()
167 if (!temp) { in thermal_add_hwmon_sysfs()
172 temp->tz = tz; in thermal_add_hwmon_sysfs()
175 snprintf(temp->temp_input.name, sizeof(temp->temp_input.name), in thermal_add_hwmon_sysfs()
176 "temp%d_input", hwmon->count); in thermal_add_hwmon_sysfs()
177 temp->temp_input.attr.attr.name = temp->temp_input.name; in thermal_add_hwmon_sysfs()
178 temp->temp_input.attr.attr.mode = 0444; in thermal_add_hwmon_sysfs()
179 temp->temp_input.attr.show = temp_input_show; in thermal_add_hwmon_sysfs()
180 sysfs_attr_init(&temp->temp_input.attr.attr); in thermal_add_hwmon_sysfs()
181 result = device_create_file(hwmon->device, &temp->temp_input.attr); in thermal_add_hwmon_sysfs()
186 snprintf(temp->temp_crit.name, in thermal_add_hwmon_sysfs()
187 sizeof(temp->temp_crit.name), in thermal_add_hwmon_sysfs()
188 "temp%d_crit", hwmon->count); in thermal_add_hwmon_sysfs()
189 temp->temp_crit.attr.attr.name = temp->temp_crit.name; in thermal_add_hwmon_sysfs()
190 temp->temp_crit.attr.attr.mode = 0444; in thermal_add_hwmon_sysfs()
191 temp->temp_crit.attr.show = temp_crit_show; in thermal_add_hwmon_sysfs()
192 sysfs_attr_init(&temp->temp_crit.attr.attr); in thermal_add_hwmon_sysfs()
194 &temp->temp_crit.attr); in thermal_add_hwmon_sysfs()
202 list_add_tail(&temp->hwmon_node, &hwmon->tz_list); in thermal_add_hwmon_sysfs()
208 device_remove_file(hwmon->device, &temp->temp_input.attr); in thermal_add_hwmon_sysfs()
210 kfree(temp); in thermal_add_hwmon_sysfs()
224 struct thermal_hwmon_temp *temp; in thermal_remove_hwmon_sysfs() local
233 temp = thermal_hwmon_lookup_temp(hwmon, tz); in thermal_remove_hwmon_sysfs()
234 if (unlikely(!temp)) { in thermal_remove_hwmon_sysfs()
240 device_remove_file(hwmon->device, &temp->temp_input.attr); in thermal_remove_hwmon_sysfs()
242 device_remove_file(hwmon->device, &temp->temp_crit.attr); in thermal_remove_hwmon_sysfs()
245 list_del(&temp->hwmon_node); in thermal_remove_hwmon_sysfs()
246 kfree(temp); in thermal_remove_hwmon_sysfs()