Lines Matching defs:device
23 /* thermal zone devices with the same type share one hwmon device */
26 struct device *device;
50 temp_input_show(struct device *dev, struct device_attribute *attr, char *buf)
70 temp_crit_show(struct device *dev, struct device_attribute *attr, char *buf)
83 if (device_is_registered(&tz->device))
161 hwmon->device = hwmon_device_register_for_thermal(&tz->device,
163 if (IS_ERR(hwmon->device)) {
164 result = PTR_ERR(hwmon->device);
184 result = device_create_file(hwmon->device, &temp->temp_input.attr);
196 result = device_create_file(hwmon->device,
211 device_remove_file(hwmon->device, &temp->temp_input.attr);
216 hwmon_device_unregister(hwmon->device);
232 dev_dbg(&tz->device, "hwmon device lookup failed!\n");
239 dev_dbg(&tz->device, "temperature input lookup failed!\n");
243 device_remove_file(hwmon->device, &temp->temp_input.attr);
245 device_remove_file(hwmon->device, &temp->temp_crit.attr);
257 hwmon_device_unregister(hwmon->device);
262 static void devm_thermal_hwmon_release(struct device *dev, void *res)
267 int devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz)
275 dev_warn(dev, "Failed to allocate device resource data\n");