Lines Matching refs:device
38 struct device *device; member
62 name_show(struct device *dev, struct device_attribute *attr, char *buf) in name_show()
70 temp_input_show(struct device *dev, struct device_attribute *attr, char *buf) in temp_input_show()
90 temp_crit_show(struct device *dev, struct device_attribute *attr, char *buf) in temp_crit_show()
168 hwmon->device = hwmon_device_register(NULL); in thermal_add_hwmon_sysfs()
169 if (IS_ERR(hwmon->device)) { in thermal_add_hwmon_sysfs()
170 result = PTR_ERR(hwmon->device); in thermal_add_hwmon_sysfs()
173 dev_set_drvdata(hwmon->device, hwmon); in thermal_add_hwmon_sysfs()
174 result = device_create_file(hwmon->device, &dev_attr_name); in thermal_add_hwmon_sysfs()
194 result = device_create_file(hwmon->device, &temp->temp_input.attr); in thermal_add_hwmon_sysfs()
206 result = device_create_file(hwmon->device, in thermal_add_hwmon_sysfs()
221 device_remove_file(hwmon->device, &temp->temp_input.attr); in thermal_add_hwmon_sysfs()
226 device_remove_file(hwmon->device, &dev_attr_name); in thermal_add_hwmon_sysfs()
227 hwmon_device_unregister(hwmon->device); in thermal_add_hwmon_sysfs()
244 dev_dbg(&tz->device, "hwmon device lookup failed!\n"); in thermal_remove_hwmon_sysfs()
251 dev_dbg(&tz->device, "temperature input lookup failed!\n"); in thermal_remove_hwmon_sysfs()
255 device_remove_file(hwmon->device, &temp->temp_input.attr); in thermal_remove_hwmon_sysfs()
257 device_remove_file(hwmon->device, &temp->temp_crit.attr); in thermal_remove_hwmon_sysfs()
269 device_remove_file(hwmon->device, &dev_attr_name); in thermal_remove_hwmon_sysfs()
270 hwmon_device_unregister(hwmon->device); in thermal_remove_hwmon_sysfs()