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()
97 struct sl28cpld_hwmon *hwmon; in sl28cpld_hwmon_probe() local
104 hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); in sl28cpld_hwmon_probe()
105 if (!hwmon) in sl28cpld_hwmon_probe()
108 hwmon->regmap = dev_get_regmap(pdev->dev.parent, NULL); in sl28cpld_hwmon_probe()
109 if (!hwmon->regmap) in sl28cpld_hwmon_probe()
112 ret = device_property_read_u32(&pdev->dev, "reg", &hwmon->offset); in sl28cpld_hwmon_probe()
117 "sl28cpld_hwmon", hwmon, in sl28cpld_hwmon_probe()
120 dev_err(&pdev->dev, "failed to register as hwmon device"); in sl28cpld_hwmon_probe()