Source
383
383
case hwmon_power_input:
384
384
return 0444;
385
385
default:
386
386
return 0;
387
387
}
388
388
default:
389
389
return 0;
390
390
}
391
391
}
392
392
393
-
static const u32 ltc4245_in_config[] = {
394
-
HWMON_I_INPUT, /* dummy, skipped in is_visible */
395
-
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
396
-
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
397
-
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
398
-
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
399
-
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
400
-
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
401
-
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
402
-
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
403
-
HWMON_I_INPUT,
404
-
HWMON_I_INPUT,
405
-
HWMON_I_INPUT,
406
-
0
407
-
};
408
-
409
-
static const struct hwmon_channel_info ltc4245_in = {
410
-
.type = hwmon_in,
411
-
.config = ltc4245_in_config,
412
-
};
413
-
414
-
static const u32 ltc4245_curr_config[] = {
415
-
HWMON_C_INPUT | HWMON_C_MAX_ALARM,
416
-
HWMON_C_INPUT | HWMON_C_MAX_ALARM,
417
-
HWMON_C_INPUT | HWMON_C_MAX_ALARM,
418
-
HWMON_C_INPUT | HWMON_C_MAX_ALARM,
419
-
0
420
-
};
421
-
422
-
static const struct hwmon_channel_info ltc4245_curr = {
423
-
.type = hwmon_curr,
424
-
.config = ltc4245_curr_config,
425
-
};
426
-
427
-
static const u32 ltc4245_power_config[] = {
428
-
HWMON_P_INPUT,
429
-
HWMON_P_INPUT,
430
-
HWMON_P_INPUT,
431
-
HWMON_P_INPUT,
432
-
0
433
-
};
434
-
435
-
static const struct hwmon_channel_info ltc4245_power = {
436
-
.type = hwmon_power,
437
-
.config = ltc4245_power_config,
438
-
};
439
-
440
393
static const struct hwmon_channel_info *ltc4245_info[] = {
441
-
<c4245_in,
442
-
<c4245_curr,
443
-
<c4245_power,
394
+
HWMON_CHANNEL_INFO(in,
395
+
HWMON_I_INPUT,
396
+
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
397
+
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
398
+
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
399
+
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
400
+
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
401
+
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
402
+
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
403
+
HWMON_I_INPUT | HWMON_I_MIN_ALARM,
404
+
HWMON_I_INPUT,
405
+
HWMON_I_INPUT,
406
+
HWMON_I_INPUT),
407
+
HWMON_CHANNEL_INFO(curr,
408
+
HWMON_C_INPUT | HWMON_C_MAX_ALARM,
409
+
HWMON_C_INPUT | HWMON_C_MAX_ALARM,
410
+
HWMON_C_INPUT | HWMON_C_MAX_ALARM,
411
+
HWMON_C_INPUT | HWMON_C_MAX_ALARM),
412
+
HWMON_CHANNEL_INFO(power,
413
+
HWMON_P_INPUT,
414
+
HWMON_P_INPUT,
415
+
HWMON_P_INPUT,
416
+
HWMON_P_INPUT),
444
417
NULL
445
418
};
446
419
447
420
static const struct hwmon_ops ltc4245_hwmon_ops = {
448
421
.is_visible = ltc4245_is_visible,
449
422
.read = ltc4245_read,
450
423
};
451
424
452
425
static const struct hwmon_chip_info ltc4245_chip_info = {
453
426
.ops = <c4245_hwmon_ops,