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()
116 struct thermal_hwmon_temp *temp; in thermal_hwmon_lookup_temp() local
119 list_for_each_entry(temp, &hwmon->tz_list, hwmon_node) in thermal_hwmon_lookup_temp()
120 if (temp->tz == tz) { in thermal_hwmon_lookup_temp()
122 return temp; in thermal_hwmon_lookup_temp()
131 int temp; in thermal_zone_crit_temp_valid() local
132 return tz->ops.get_crit_temp && !tz->ops.get_crit_temp(tz, &temp); in thermal_zone_crit_temp_valid()
138 struct thermal_hwmon_temp *temp; in thermal_add_hwmon_sysfs() local
163 temp = kzalloc(sizeof(*temp), GFP_KERNEL); in thermal_add_hwmon_sysfs()
164 if (!temp) { in thermal_add_hwmon_sysfs()
169 temp->tz = tz; in thermal_add_hwmon_sysfs()
172 snprintf(temp->temp_input.name, sizeof(temp->temp_input.name), in thermal_add_hwmon_sysfs()
173 "temp%d_input", hwmon->count); in thermal_add_hwmon_sysfs()
174 temp->temp_input.attr.attr.name = temp->temp_input.name; in thermal_add_hwmon_sysfs()
175 temp->temp_input.attr.attr.mode = 0444; in thermal_add_hwmon_sysfs()
176 temp->temp_input.attr.show = temp_input_show; in thermal_add_hwmon_sysfs()
177 sysfs_attr_init(&temp->temp_input.attr.attr); in thermal_add_hwmon_sysfs()
178 result = device_create_file(hwmon->device, &temp->temp_input.attr); in thermal_add_hwmon_sysfs()
183 snprintf(temp->temp_crit.name, in thermal_add_hwmon_sysfs()
184 sizeof(temp->temp_crit.name), in thermal_add_hwmon_sysfs()
185 "temp%d_crit", hwmon->count); in thermal_add_hwmon_sysfs()
186 temp->temp_crit.attr.attr.name = temp->temp_crit.name; in thermal_add_hwmon_sysfs()
187 temp->temp_crit.attr.attr.mode = 0444; in thermal_add_hwmon_sysfs()
188 temp->temp_crit.attr.show = temp_crit_show; in thermal_add_hwmon_sysfs()
189 sysfs_attr_init(&temp->temp_crit.attr.attr); in thermal_add_hwmon_sysfs()
191 &temp->temp_crit.attr); in thermal_add_hwmon_sysfs()
199 list_add_tail(&temp->hwmon_node, &hwmon->tz_list); in thermal_add_hwmon_sysfs()
205 device_remove_file(hwmon->device, &temp->temp_input.attr); in thermal_add_hwmon_sysfs()
207 kfree(temp); in thermal_add_hwmon_sysfs()
221 struct thermal_hwmon_temp *temp; in thermal_remove_hwmon_sysfs() local
230 temp = thermal_hwmon_lookup_temp(hwmon, tz); in thermal_remove_hwmon_sysfs()
231 if (unlikely(!temp)) { in thermal_remove_hwmon_sysfs()
237 device_remove_file(hwmon->device, &temp->temp_input.attr); in thermal_remove_hwmon_sysfs()
239 device_remove_file(hwmon->device, &temp->temp_crit.attr); in thermal_remove_hwmon_sysfs()
242 list_del(&temp->hwmon_node); in thermal_remove_hwmon_sysfs()
243 kfree(temp); in thermal_remove_hwmon_sysfs()