• Home
  • Raw
  • Download

Lines Matching full:temp

53 	struct thermal_hwmon_temp *temp  in temp_input_show()  local
56 struct thermal_zone_device *tz = temp->tz; in temp_input_show()
71 struct thermal_hwmon_temp *temp in temp_crit_show() local
74 struct thermal_zone_device *tz = temp->tz; in temp_crit_show()
111 struct thermal_hwmon_temp *temp; in thermal_hwmon_lookup_temp() local
114 list_for_each_entry(temp, &hwmon->tz_list, hwmon_node) in thermal_hwmon_lookup_temp()
115 if (temp->tz == tz) { in thermal_hwmon_lookup_temp()
117 return temp; in thermal_hwmon_lookup_temp()
126 int temp; in thermal_zone_crit_temp_valid() local
127 return tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, &temp); in thermal_zone_crit_temp_valid()
133 struct thermal_hwmon_temp *temp; in thermal_add_hwmon_sysfs() local
158 temp = kzalloc(sizeof(*temp), GFP_KERNEL); in thermal_add_hwmon_sysfs()
159 if (!temp) { in thermal_add_hwmon_sysfs()
164 temp->tz = tz; in thermal_add_hwmon_sysfs()
167 snprintf(temp->temp_input.name, sizeof(temp->temp_input.name), in thermal_add_hwmon_sysfs()
168 "temp%d_input", hwmon->count); in thermal_add_hwmon_sysfs()
169 temp->temp_input.attr.attr.name = temp->temp_input.name; in thermal_add_hwmon_sysfs()
170 temp->temp_input.attr.attr.mode = 0444; in thermal_add_hwmon_sysfs()
171 temp->temp_input.attr.show = temp_input_show; in thermal_add_hwmon_sysfs()
172 sysfs_attr_init(&temp->temp_input.attr.attr); in thermal_add_hwmon_sysfs()
173 result = device_create_file(hwmon->device, &temp->temp_input.attr); in thermal_add_hwmon_sysfs()
178 snprintf(temp->temp_crit.name, in thermal_add_hwmon_sysfs()
179 sizeof(temp->temp_crit.name), in thermal_add_hwmon_sysfs()
180 "temp%d_crit", hwmon->count); in thermal_add_hwmon_sysfs()
181 temp->temp_crit.attr.attr.name = temp->temp_crit.name; in thermal_add_hwmon_sysfs()
182 temp->temp_crit.attr.attr.mode = 0444; in thermal_add_hwmon_sysfs()
183 temp->temp_crit.attr.show = temp_crit_show; in thermal_add_hwmon_sysfs()
184 sysfs_attr_init(&temp->temp_crit.attr.attr); in thermal_add_hwmon_sysfs()
186 &temp->temp_crit.attr); in thermal_add_hwmon_sysfs()
194 list_add_tail(&temp->hwmon_node, &hwmon->tz_list); in thermal_add_hwmon_sysfs()
200 device_remove_file(hwmon->device, &temp->temp_input.attr); in thermal_add_hwmon_sysfs()
202 kfree(temp); in thermal_add_hwmon_sysfs()
217 struct thermal_hwmon_temp *temp; in thermal_remove_hwmon_sysfs() local
226 temp = thermal_hwmon_lookup_temp(hwmon, tz); in thermal_remove_hwmon_sysfs()
227 if (unlikely(!temp)) { in thermal_remove_hwmon_sysfs()
233 device_remove_file(hwmon->device, &temp->temp_input.attr); in thermal_remove_hwmon_sysfs()
235 device_remove_file(hwmon->device, &temp->temp_crit.attr); in thermal_remove_hwmon_sysfs()
238 list_del(&temp->hwmon_node); in thermal_remove_hwmon_sysfs()
239 kfree(temp); in thermal_remove_hwmon_sysfs()