Lines Matching defs: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)
98 struct cgbc_device_data *cgbc = hwmon->cgbc;
99 struct cgbc_hwmon_sensor *sensor = hwmon->sensors;
109 hwmon->sensors = devm_kzalloc(dev, sizeof(*hwmon->sensors) * nb_sensors, GFP_KERNEL);
110 sensor = hwmon->sensors;
155 hwmon->nb_sensors++;
161 static struct cgbc_hwmon_sensor *cgbc_hwmon_find_sensor(struct cgbc_hwmon_data *hwmon,
175 for (i = 0; i < hwmon->nb_sensors; i++) {
176 if (hwmon->sensors[i].type == type && hwmon->sensors[i].channel == channel) {
177 sensor = &hwmon->sensors[i];
188 struct cgbc_hwmon_data *hwmon = dev_get_drvdata(dev);
189 struct cgbc_hwmon_sensor *sensor = cgbc_hwmon_find_sensor(hwmon, type, channel);
190 struct cgbc_device_data *cgbc = hwmon->cgbc;
226 struct cgbc_hwmon_data *hwmon = dev_get_drvdata(dev);
227 struct cgbc_hwmon_sensor *sensor = cgbc_hwmon_find_sensor(hwmon, type, channel);
295 .name = "cgbc-hwmon",