Lines Matching refs:hwdev
130 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_dev_release() local
132 if (hwdev->group.attrs) in hwmon_dev_release()
133 hwmon_free_attrs(hwdev->group.attrs); in hwmon_dev_release()
134 kfree(hwdev->groups); in hwmon_dev_release()
135 kfree(hwdev->label); in hwmon_dev_release()
136 kfree(hwdev); in hwmon_dev_release()
157 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_get_temp() local
161 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input, in hwmon_thermal_get_temp()
174 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_set_trips() local
175 const struct hwmon_chip_info *chip = hwdev->chip; in hwmon_thermal_set_trips()
218 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_thermal_add_sensor() local
246 list_add(&tdata->node, &hwdev->tzdata); in hwmon_thermal_add_sensor()
253 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_thermal_register_sensors() local
254 const struct hwmon_chip_info *chip = hwdev->chip; in hwmon_thermal_register_sensors()
284 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_thermal_notify() local
287 list_for_each_entry(tzdata, &hwdev->tzdata, node) { in hwmon_thermal_notify()
761 struct hwmon_device *hwdev; in __hwmon_device_register() local
777 hwdev = kzalloc(sizeof(*hwdev), GFP_KERNEL); in __hwmon_device_register()
778 if (hwdev == NULL) { in __hwmon_device_register()
783 hdev = &hwdev->dev; in __hwmon_device_register()
793 hwdev->groups = kcalloc(ngroups, sizeof(*groups), GFP_KERNEL); in __hwmon_device_register()
794 if (!hwdev->groups) { in __hwmon_device_register()
805 hwdev->group.attrs = attrs; in __hwmon_device_register()
807 hwdev->groups[ngroups++] = &hwdev->group; in __hwmon_device_register()
811 hwdev->groups[ngroups++] = groups[i]; in __hwmon_device_register()
814 hdev->groups = hwdev->groups; in __hwmon_device_register()
824 hwdev->label = kstrdup(label, GFP_KERNEL); in __hwmon_device_register()
825 if (hwdev->label == NULL) { in __hwmon_device_register()
831 hwdev->name = name; in __hwmon_device_register()
837 hwdev->chip = chip; in __hwmon_device_register()
846 INIT_LIST_HEAD(&hwdev->tzdata); in __hwmon_device_register()
988 struct device *hwdev = *(struct device **)res; in devm_hwmon_release() local
990 hwmon_device_unregister(hwdev); in devm_hwmon_release()
1008 struct device **ptr, *hwdev; in devm_hwmon_device_register_with_groups() local
1017 hwdev = hwmon_device_register_with_groups(dev, name, drvdata, groups); in devm_hwmon_device_register_with_groups()
1018 if (IS_ERR(hwdev)) in devm_hwmon_device_register_with_groups()
1021 *ptr = hwdev; in devm_hwmon_device_register_with_groups()
1023 return hwdev; in devm_hwmon_device_register_with_groups()
1027 return hwdev; in devm_hwmon_device_register_with_groups()
1048 struct device **ptr, *hwdev; in devm_hwmon_device_register_with_info() local
1057 hwdev = hwmon_device_register_with_info(dev, name, drvdata, chip, in devm_hwmon_device_register_with_info()
1059 if (IS_ERR(hwdev)) in devm_hwmon_device_register_with_info()
1062 *ptr = hwdev; in devm_hwmon_device_register_with_info()
1065 return hwdev; in devm_hwmon_device_register_with_info()
1069 return hwdev; in devm_hwmon_device_register_with_info()
1075 struct device **hwdev = res; in devm_hwmon_match() local
1077 return *hwdev == data; in devm_hwmon_match()