Lines Matching refs:hwdev

131 	struct hwmon_device *hwdev = to_hwmon_device(dev);  in hwmon_dev_release()  local
133 if (hwdev->group.attrs) in hwmon_dev_release()
134 hwmon_free_attrs(hwdev->group.attrs); in hwmon_dev_release()
135 kfree(hwdev->groups); in hwmon_dev_release()
136 kfree(hwdev->label); in hwmon_dev_release()
137 kfree(hwdev); in hwmon_dev_release()
164 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_get_temp() local
168 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input, in hwmon_thermal_get_temp()
181 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_set_trips() local
182 const struct hwmon_chip_info *chip = hwdev->chip; in hwmon_thermal_set_trips()
225 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_thermal_add_sensor() local
253 list_add(&tdata->node, &hwdev->tzdata); in hwmon_thermal_add_sensor()
260 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_thermal_register_sensors() local
261 const struct hwmon_chip_info *chip = hwdev->chip; in hwmon_thermal_register_sensors()
294 struct hwmon_device *hwdev = to_hwmon_device(dev); in hwmon_thermal_notify() local
300 list_for_each_entry(tzdata, &hwdev->tzdata, node) { in hwmon_thermal_notify()
352 struct hwmon_device *hwdev; in pec_store() local
371 hwdev = to_hwmon_device(hdev); in pec_store()
372 if (hwdev->chip->ops->write) { in pec_store()
373 err = hwdev->chip->ops->write(hdev, hwmon_chip, hwmon_chip_pec, 0, val); in pec_store()
871 struct hwmon_device *hwdev; in __hwmon_device_register() local
887 hwdev = kzalloc(sizeof(*hwdev), GFP_KERNEL); in __hwmon_device_register()
888 if (hwdev == NULL) { in __hwmon_device_register()
893 hdev = &hwdev->dev; in __hwmon_device_register()
903 hwdev->groups = kcalloc(ngroups, sizeof(*groups), GFP_KERNEL); in __hwmon_device_register()
904 if (!hwdev->groups) { in __hwmon_device_register()
915 hwdev->group.attrs = attrs; in __hwmon_device_register()
917 hwdev->groups[ngroups++] = &hwdev->group; in __hwmon_device_register()
921 hwdev->groups[ngroups++] = groups[i]; in __hwmon_device_register()
924 hdev->groups = hwdev->groups; in __hwmon_device_register()
934 hwdev->label = kstrdup(label, GFP_KERNEL); in __hwmon_device_register()
935 if (hwdev->label == NULL) { in __hwmon_device_register()
941 hwdev->name = name; in __hwmon_device_register()
947 hwdev->chip = chip; in __hwmon_device_register()
956 INIT_LIST_HEAD(&hwdev->tzdata); in __hwmon_device_register()
1108 struct device *hwdev = *(struct device **)res; in devm_hwmon_release() local
1110 hwmon_device_unregister(hwdev); in devm_hwmon_release()
1128 struct device **ptr, *hwdev; in devm_hwmon_device_register_with_groups() local
1137 hwdev = hwmon_device_register_with_groups(dev, name, drvdata, groups); in devm_hwmon_device_register_with_groups()
1138 if (IS_ERR(hwdev)) in devm_hwmon_device_register_with_groups()
1141 *ptr = hwdev; in devm_hwmon_device_register_with_groups()
1143 return hwdev; in devm_hwmon_device_register_with_groups()
1147 return hwdev; in devm_hwmon_device_register_with_groups()
1168 struct device **ptr, *hwdev; in devm_hwmon_device_register_with_info() local
1183 hwdev = hwmon_device_register_with_info(dev, name, drvdata, chip, in devm_hwmon_device_register_with_info()
1185 if (IS_ERR(hwdev)) in devm_hwmon_device_register_with_info()
1188 *ptr = hwdev; in devm_hwmon_device_register_with_info()
1191 return hwdev; in devm_hwmon_device_register_with_info()
1195 return hwdev; in devm_hwmon_device_register_with_info()