diff options
author | Guenter Roeck <linux@roeck-us.net> | 2015-08-17 23:08:09 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2015-08-19 12:08:55 -0400 |
commit | ccf2dc51bc4a715670641aa5af0d4636acd8e0cd (patch) | |
tree | 65f3c46b2607f33b2cff9ffea0773252d66fb083 /drivers/hwmon/pmbus | |
parent | e04d1ce9bbb49862fd8266da764f5ebf67baaac0 (diff) |
hwmon: (ltc2978) Add support for LTM4675
LTM2975 is a dual 9A or single 18A μModule regulator.
It is register compatible with LTM4676.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pmbus')
-rw-r--r-- | drivers/hwmon/pmbus/Kconfig | 2 | ||||
-rw-r--r-- | drivers/hwmon/pmbus/ltc2978.c | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig index 5ebc36255c88..df6ebb2b8f0f 100644 --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig | |||
@@ -53,7 +53,7 @@ config SENSORS_LTC2978 | |||
53 | help | 53 | help |
54 | If you say yes here you get hardware monitoring support for Linear | 54 | If you say yes here you get hardware monitoring support for Linear |
55 | Technology LTC2974, LTC2975, LTC2977, LTC2978, LTC2980, LTC3880, | 55 | Technology LTC2974, LTC2975, LTC2977, LTC2978, LTC2980, LTC3880, |
56 | LTC3883, LTC3886, LTC3887, LTCM2987, and LTM4676. | 56 | LTC3883, LTC3886, LTC3887, LTCM2987, LTM4675, and LTM4676. |
57 | 57 | ||
58 | This driver can also be built as a module. If so, the module will | 58 | This driver can also be built as a module. If so, the module will |
59 | be called ltc2978. | 59 | be called ltc2978. |
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c index f1c69c9de849..58b789c28b48 100644 --- a/drivers/hwmon/pmbus/ltc2978.c +++ b/drivers/hwmon/pmbus/ltc2978.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "pmbus.h" | 28 | #include "pmbus.h" |
29 | 29 | ||
30 | enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882, | 30 | enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882, |
31 | ltc3883, ltc3886, ltc3887, ltm2987, ltm4676 }; | 31 | ltc3883, ltc3886, ltc3887, ltm2987, ltm4675, ltm4676 }; |
32 | 32 | ||
33 | /* Common for all chips */ | 33 | /* Common for all chips */ |
34 | #define LTC2978_MFR_VOUT_PEAK 0xdd | 34 | #define LTC2978_MFR_VOUT_PEAK 0xdd |
@@ -46,7 +46,7 @@ enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882, | |||
46 | #define LTC2974_MFR_IOUT_PEAK 0xd7 | 46 | #define LTC2974_MFR_IOUT_PEAK 0xd7 |
47 | #define LTC2974_MFR_IOUT_MIN 0xd8 | 47 | #define LTC2974_MFR_IOUT_MIN 0xd8 |
48 | 48 | ||
49 | /* LTC3880, LTC3882, LTC3883, LTC3887, and LTM4676 */ | 49 | /* LTC3880, LTC3882, LTC3883, LTC3887, LTM4675, and LTM4676 */ |
50 | #define LTC3880_MFR_IOUT_PEAK 0xd7 | 50 | #define LTC3880_MFR_IOUT_PEAK 0xd7 |
51 | #define LTC3880_MFR_CLEAR_PEAKS 0xe3 | 51 | #define LTC3880_MFR_CLEAR_PEAKS 0xe3 |
52 | #define LTC3880_MFR_TEMPERATURE2_PEAK 0xf4 | 52 | #define LTC3880_MFR_TEMPERATURE2_PEAK 0xf4 |
@@ -77,6 +77,7 @@ enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882, | |||
77 | #define LTC3887_ID 0x4700 | 77 | #define LTC3887_ID 0x4700 |
78 | #define LTM2987_ID_A 0x8010 /* A/B for two die IDs */ | 78 | #define LTM2987_ID_A 0x8010 /* A/B for two die IDs */ |
79 | #define LTM2987_ID_B 0x8020 | 79 | #define LTM2987_ID_B 0x8020 |
80 | #define LTM4675_ID 0x47a0 | ||
80 | #define LTM4676_ID_REV1 0x4400 | 81 | #define LTM4676_ID_REV1 0x4400 |
81 | #define LTM4676_ID_REV2 0x4480 | 82 | #define LTM4676_ID_REV2 0x4480 |
82 | #define LTM4676A_ID 0x47e0 | 83 | #define LTM4676A_ID 0x47e0 |
@@ -509,6 +510,7 @@ static const struct i2c_device_id ltc2978_id[] = { | |||
509 | {"ltc3886", ltc3886}, | 510 | {"ltc3886", ltc3886}, |
510 | {"ltc3887", ltc3887}, | 511 | {"ltc3887", ltc3887}, |
511 | {"ltm2987", ltm2987}, | 512 | {"ltm2987", ltm2987}, |
513 | {"ltm4675", ltm4675}, | ||
512 | {"ltm4676", ltm4676}, | 514 | {"ltm4676", ltm4676}, |
513 | {} | 515 | {} |
514 | }; | 516 | }; |
@@ -581,6 +583,8 @@ static int ltc2978_get_id(struct i2c_client *client) | |||
581 | return ltc3887; | 583 | return ltc3887; |
582 | else if (chip_id == LTM2987_ID_A || chip_id == LTM2987_ID_B) | 584 | else if (chip_id == LTM2987_ID_A || chip_id == LTM2987_ID_B) |
583 | return ltm2987; | 585 | return ltm2987; |
586 | else if (chip_id == LTM4675_ID) | ||
587 | return ltm4675; | ||
584 | else if (chip_id == LTM4676_ID_REV1 || chip_id == LTM4676_ID_REV2 || | 588 | else if (chip_id == LTM4676_ID_REV1 || chip_id == LTM4676_ID_REV2 || |
585 | chip_id == LTM4676A_ID) | 589 | chip_id == LTM4676A_ID) |
586 | return ltm4676; | 590 | return ltm4676; |
@@ -678,6 +682,7 @@ static int ltc2978_probe(struct i2c_client *client, | |||
678 | break; | 682 | break; |
679 | case ltc3880: | 683 | case ltc3880: |
680 | case ltc3887: | 684 | case ltc3887: |
685 | case ltm4675: | ||
681 | case ltm4676: | 686 | case ltm4676: |
682 | data->features |= FEAT_CLEAR_PEAKS | FEAT_NEEDS_POLLING; | 687 | data->features |= FEAT_CLEAR_PEAKS | FEAT_NEEDS_POLLING; |
683 | info->read_word_data = ltc3880_read_word_data; | 688 | info->read_word_data = ltc3880_read_word_data; |
@@ -763,6 +768,7 @@ static const struct of_device_id ltc2978_of_match[] = { | |||
763 | { .compatible = "lltc,ltc3886" }, | 768 | { .compatible = "lltc,ltc3886" }, |
764 | { .compatible = "lltc,ltc3887" }, | 769 | { .compatible = "lltc,ltc3887" }, |
765 | { .compatible = "lltc,ltm2987" }, | 770 | { .compatible = "lltc,ltm2987" }, |
771 | { .compatible = "lltc,ltm4675" }, | ||
766 | { .compatible = "lltc,ltm4676" }, | 772 | { .compatible = "lltc,ltm4676" }, |
767 | { } | 773 | { } |
768 | }; | 774 | }; |