Lines Matching full:hwmon

3  * cgbc-hwmon - Congatec Board Controller hardware monitoring driver
10 #include <linux/hwmon.h>
96 static int cgbc_hwmon_probe_sensors(struct device *dev, struct cgbc_hwmon_data *hwmon) in cgbc_hwmon_probe_sensors() argument
98 struct cgbc_device_data *cgbc = hwmon->cgbc; in cgbc_hwmon_probe_sensors()
99 struct cgbc_hwmon_sensor *sensor = hwmon->sensors; in cgbc_hwmon_probe_sensors()
109 hwmon->sensors = devm_kzalloc(dev, sizeof(*hwmon->sensors) * nb_sensors, GFP_KERNEL); in cgbc_hwmon_probe_sensors()
110 if (!hwmon->sensors) in cgbc_hwmon_probe_sensors()
113 sensor = hwmon->sensors; in cgbc_hwmon_probe_sensors()
158 hwmon->nb_sensors++; in cgbc_hwmon_probe_sensors()
164 static struct cgbc_hwmon_sensor *cgbc_hwmon_find_sensor(struct cgbc_hwmon_data *hwmon, in cgbc_hwmon_find_sensor() argument
178 for (i = 0; i < hwmon->nb_sensors; i++) { in cgbc_hwmon_find_sensor()
179 if (hwmon->sensors[i].type == type && hwmon->sensors[i].channel == channel) { in cgbc_hwmon_find_sensor()
180 sensor = &hwmon->sensors[i]; in cgbc_hwmon_find_sensor()
191 struct cgbc_hwmon_data *hwmon = dev_get_drvdata(dev); in cgbc_hwmon_read() local
192 struct cgbc_hwmon_sensor *sensor = cgbc_hwmon_find_sensor(hwmon, type, channel); in cgbc_hwmon_read()
193 struct cgbc_device_data *cgbc = hwmon->cgbc; in cgbc_hwmon_read()
229 struct cgbc_hwmon_data *hwmon = dev_get_drvdata(dev); in cgbc_hwmon_read_string() local
230 struct cgbc_hwmon_sensor *sensor = cgbc_hwmon_find_sensor(hwmon, type, channel); in cgbc_hwmon_read_string()
298 .name = "cgbc-hwmon",