Lines Matching refs:hwmon
2 * drivers/hwmon/wm831x-hwmon.c - Wolfson Microelectronics WM831x PMIC
25 #include <linux/hwmon.h>
26 #include <linux/hwmon-sysfs.h>
57 struct wm831x_hwmon *hwmon = dev_get_drvdata(dev);
61 ret = wm831x_auxadc_read_uv(hwmon->wm831x, channel);
71 struct wm831x_hwmon *hwmon = dev_get_drvdata(dev);
75 ret = wm831x_auxadc_read(hwmon->wm831x, channel);
161 struct wm831x_hwmon *hwmon;
164 hwmon = kzalloc(sizeof(struct wm831x_hwmon), GFP_KERNEL);
165 if (!hwmon)
168 hwmon->wm831x = wm831x;
174 hwmon->classdev = hwmon_device_register(&pdev->dev);
175 if (IS_ERR(hwmon->classdev)) {
176 ret = PTR_ERR(hwmon->classdev);
180 platform_set_drvdata(pdev, hwmon);
187 kfree(hwmon);
193 struct wm831x_hwmon *hwmon = platform_get_drvdata(pdev);
195 hwmon_device_unregister(hwmon->classdev);
198 kfree(hwmon);
207 .name = "wm831x-hwmon",
227 MODULE_ALIAS("platform:wm831x-hwmon");