Lines Matching full:hwmon
9 #include <linux/hwmon.h>
37 struct sl28cpld_hwmon *hwmon = dev_get_drvdata(dev); in sl28cpld_hwmon_read() local
43 ret = regmap_read(hwmon->regmap, hwmon->offset + FAN_INPUT, in sl28cpld_hwmon_read()
87 struct sl28cpld_hwmon *hwmon; in sl28cpld_hwmon_probe() local
94 hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); in sl28cpld_hwmon_probe()
95 if (!hwmon) in sl28cpld_hwmon_probe()
98 hwmon->regmap = dev_get_regmap(pdev->dev.parent, NULL); in sl28cpld_hwmon_probe()
99 if (!hwmon->regmap) in sl28cpld_hwmon_probe()
102 ret = device_property_read_u32(&pdev->dev, "reg", &hwmon->offset); in sl28cpld_hwmon_probe()
107 "sl28cpld_hwmon", hwmon, in sl28cpld_hwmon_probe()
110 dev_err(&pdev->dev, "failed to register as hwmon device"); in sl28cpld_hwmon_probe()