Lines Matching refs:hwdev
115 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_dev_release() local
117 if (hwdev->group.attrs) in hwmon_dev_release()
118 hwmon_free_attrs(hwdev->group.attrs); in hwmon_dev_release()
119 kfree(hwdev->groups); in hwmon_dev_release()
120 kfree(hwdev); in hwmon_dev_release()
142 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_get_temp() local
146 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input, in hwmon_thermal_get_temp()
159 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_set_trips() local
160 const struct hwmon_chip_info *chip = hwdev->chip; in hwmon_thermal_set_trips()
203 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_thermal_add_sensor() local
229 list_add(&tdata->node, &hwdev->tzdata); in hwmon_thermal_add_sensor()
236 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_thermal_register_sensors() local
237 const struct hwmon_chip_info *chip = hwdev->chip; in hwmon_thermal_register_sensors()
267 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_thermal_notify() local
270 list_for_each_entry(tzdata, &hwdev->tzdata, node) { in hwmon_thermal_notify()
735 struct hwmon_device *hwdev; in __hwmon_device_register() local
749 hwdev = kzalloc(sizeof(*hwdev), GFP_KERNEL); in __hwmon_device_register()
750 if (hwdev == NULL) { in __hwmon_device_register()
755 hdev = &hwdev->dev; in __hwmon_device_register()
765 hwdev->groups = kcalloc(ngroups, sizeof(*groups), GFP_KERNEL); in __hwmon_device_register()
766 if (!hwdev->groups) { in __hwmon_device_register()
777 hwdev->group.attrs = attrs; in __hwmon_device_register()
779 hwdev->groups[ngroups++] = &hwdev->group; in __hwmon_device_register()
783 hwdev->groups[ngroups++] = groups[i]; in __hwmon_device_register()
786 hdev->groups = hwdev->groups; in __hwmon_device_register()
791 hwdev->name = name; in __hwmon_device_register()
795 hwdev->chip = chip; in __hwmon_device_register()
802 INIT_LIST_HEAD(&hwdev->tzdata); in __hwmon_device_register()
921 struct device *hwdev = *(struct device **)res; in devm_hwmon_release() local
923 hwmon_device_unregister(hwdev); in devm_hwmon_release()
941 struct device **ptr, *hwdev; in devm_hwmon_device_register_with_groups() local
950 hwdev = hwmon_device_register_with_groups(dev, name, drvdata, groups); in devm_hwmon_device_register_with_groups()
951 if (IS_ERR(hwdev)) in devm_hwmon_device_register_with_groups()
954 *ptr = hwdev; in devm_hwmon_device_register_with_groups()
956 return hwdev; in devm_hwmon_device_register_with_groups()
960 return hwdev; in devm_hwmon_device_register_with_groups()
981 struct device **ptr, *hwdev; in devm_hwmon_device_register_with_info() local
990 hwdev = hwmon_device_register_with_info(dev, name, drvdata, chip, in devm_hwmon_device_register_with_info()
992 if (IS_ERR(hwdev)) in devm_hwmon_device_register_with_info()
995 *ptr = hwdev; in devm_hwmon_device_register_with_info()
998 return hwdev; in devm_hwmon_device_register_with_info()
1002 return hwdev; in devm_hwmon_device_register_with_info()
1008 struct device **hwdev = res; in devm_hwmon_match() local
1010 return *hwdev == data; in devm_hwmon_match()