Source
444
444
struct jc42_chips *chip = &jc42_chips[i];
445
445
if (manid == chip->manid &&
446
446
(devid & chip->devid_mask) == chip->devid) {
447
447
strlcpy(info->type, "jc42", I2C_NAME_SIZE);
448
448
return 0;
449
449
}
450
450
}
451
451
return -ENODEV;
452
452
}
453
453
454
-
static const u32 jc42_temp_config[] = {
455
-
HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX | HWMON_T_CRIT |
456
-
HWMON_T_MAX_HYST | HWMON_T_CRIT_HYST |
457
-
HWMON_T_MIN_ALARM | HWMON_T_MAX_ALARM | HWMON_T_CRIT_ALARM,
458
-
0
459
-
};
460
-
461
-
static const struct hwmon_channel_info jc42_temp = {
462
-
.type = hwmon_temp,
463
-
.config = jc42_temp_config,
464
-
};
465
-
466
454
static const struct hwmon_channel_info *jc42_info[] = {
467
-
&jc42_temp,
455
+
HWMON_CHANNEL_INFO(temp,
456
+
HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX |
457
+
HWMON_T_CRIT | HWMON_T_MAX_HYST |
458
+
HWMON_T_CRIT_HYST | HWMON_T_MIN_ALARM |
459
+
HWMON_T_MAX_ALARM | HWMON_T_CRIT_ALARM),
468
460
NULL
469
461
};
470
462
471
463
static const struct hwmon_ops jc42_hwmon_ops = {
472
464
.is_visible = jc42_is_visible,
473
465
.read = jc42_read,
474
466
.write = jc42_write,
475
467
};
476
468
477
469
static const struct hwmon_chip_info jc42_chip_info = {