hwmon: (ltc2978) Add support for LTC2980 and LTM2987
Subsystems (3)
Guenter Roeck
maintainerPATCH 7/8 hwmon: (ltc2978) Add support for LTC2980 and LTM2987
LTC2980 and LTM2987 are command compatible to LTC2977. They consist of two LTC2977 on a single die, and are instantiated as two separate chips, each supporting eight channels.
Suggested-by Michael Jones <[email protected]>
Tested-by Michael Jones <[email protected]>
Signed-off-by Guenter Roeck <[email protected]>
--- .../devicetree/bindings/hwmon/ltc2978.txt | 4 +- Documentation/hwmon/ltc2978 | 49 ++++++++++++++++------ drivers/hwmon/pmbus/Kconfig | 4 +- drivers/hwmon/pmbus/ltc2978.c | 20 +++++++-- 4 files changed, 58 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/hwmon/ltc2978.txt +3 -1
@@ -6,10 +6,12 @@ Required properties: * "lltc,ltc2975" * "lltc,ltc2977" * "lltc,ltc2978" + * "lltc,ltc2980" * "lltc,ltc3880" * "lltc,ltc3882" * "lltc,ltc3883" * "lltc,ltc3887" + * "lltc,ltm2987" * "lltc,ltm4676" - reg: I2C slave address
@@ -21,7 +23,7 @@ Optional properties: Valid names of regulators depend on number of supplies supported per device: * ltc2974, ltc2975 : vout0 - vout3 - * ltc2977 : vout0 - vout7 + * ltc2977, ltc2980, ltm2987 : vout0 - vout7 * ltc2978 : vout0 - vout7 * ltc3880, ltc3882 : vout0 - vout1 * ltc3883 : vout0
Documentation/hwmon/ltc2978 +36 -13
119 lines not on this page · raw message
drivers/hwmon/pmbus/Kconfig +2 -2
@@ -52,8 +52,8 @@ config SENSORS_LTC2978 default n help If you say yes here you get hardware monitoring support for Linear - Technology LTC2974, LTC2975, LTC2977, LTC2978, LTC3880, LTC3883, - LTC3887, and LTM4676. + Technology LTC2974, LTC2975, LTC2977, LTC2978, LTC2980, LTC3880, + LTC3883, LTC3887, LTCM2987, and LTM4676. This driver can also be built as a module. If so, the module will be called ltc2978.
drivers/hwmon/pmbus/ltc2978.c +17 -3
@@ -24,8 +24,8 @@#include <linux/regulator/driver.h> #include "pmbus.h" -enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc3880, ltc3882, ltc3883, - ltc3887, ltm4676 }; +enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882, + ltc3883, ltc3887, ltm2987, ltm4676 };/* Common for all chips */ #define LTC2978_MFR_VOUT_PEAK 0xdd
@@ -33,7 +33,7 @@ enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc3880, ltc3882, ltc3883,#define LTC2978_MFR_TEMPERATURE_PEAK 0xdf#define LTC2978_MFR_SPECIAL_ID 0xe7/* Undocumented on LTC3882 */ -/* LTC2974, LTC2975, LCT2977, and LTC2978 */ +/* LTC2974, LTC2975, LCT2977, LTC2980, LTC2978, and LTM2987 */ #define LTC2978_MFR_VOUT_MIN 0xfb#define LTC2978_MFR_VIN_MIN 0xfc#define LTC2978_MFR_TEMPERATURE_MIN 0xfd
@@ -63,11 +63,15 @@ enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc3880, ltc3882, ltc3883,#define LTC2977_ID 0x0130#define LTC2978_ID_REV1 0x0110/* Early revision */ #define LTC2978_ID_REV2 0x0120 +#define LTC2980_ID_A 0x8030/* A/B for two die IDs */ +#define LTC2980_ID_B 0x8040#define LTC3880_ID 0x4000#define LTC3882_ID 0x4200#define LTC3882_ID_D1 0x4240/* Dash 1 */ #define LTC3883_ID 0x4300#define LTC3887_ID 0x4700 +#define LTM2987_ID_A 0x8010/* A/B for two die IDs */ +#define LTM2987_ID_B 0x8020#define LTM4676_ID_REV1 0x4400#define LTM4676_ID_REV2 0x4480#define LTM4676A_ID 0x47e0
@@ -409,10 +413,12 @@ static const struct i2c_device_id ltc2978_id[] = { {"ltc2975", ltc2975}, {"ltc2977", ltc2977}, {"ltc2978", ltc2978}, + {"ltc2980", ltc2980}, {"ltc3880", ltc3880}, {"ltc3882", ltc3882}, {"ltc3883", ltc3883}, {"ltc3887", ltc3887}, + {"ltm2987", ltm2987}, {"ltm4676", ltm4676}, {} };
@@ -471,6 +477,8 @@ static int ltc2978_get_id(struct i2c_client *client)return ltc2977; else if (chip_id = LTC2978_ID_REV1 || chip_id = LTC2978_ID_REV2) return ltc2978; + else if (chip_id = LTC2980_ID_A || chip_id = LTC2980_ID_B) + return ltc2980; else if (chip_id = LTC3880_ID) return ltc3880; else if (chip_id = LTC3882_ID || chip_id = LTC3882_ID_D1)
@@ -479,6 +487,8 @@ static int ltc2978_get_id(struct i2c_client *client)return ltc3883; else if (chip_id = LTC3887_ID) return ltc3887; + else if (chip_id = LTM2987_ID_A || LTM2987_ID_B) +return ltm2987; else if (chip_id = LTM4676_ID_REV1 || chip_id = LTM4676_ID_REV2 || chip_id = LTM4676A_ID) return ltm4676;
@@ -559,6 +569,8 @@ static int ltc2978_probe(struct i2c_client *client,break ;case ltc2977:case ltc2978: +case ltc2980: +case ltm2987: info->read_word_data = ltc2978_read_word_data; info->pages =LTC2978_NUM_PAGES ; info->func[0 ] =PMBUS_HAVE_VIN |PMBUS_HAVE_STATUS_INPUT
@@ -634,10 +646,12 @@ static const struct of_device_id ltc2978_of_match[] = { { .compatible = "lltc,ltc2975" }, { .compatible = "lltc,ltc2977" }, { .compatible = "lltc,ltc2978" }, + { .compatible = "lltc,ltc2980" }, { .compatible = "lltc,ltc3880" }, { .compatible = "lltc,ltc3882" }, { .compatible = "lltc,ltc3883" }, { .compatible = "lltc,ltc3887" }, + { .compatible = "lltc,ltm2987" }, { .compatible = "lltc,ltm4676" }, { } };
Signature · 7 lines
2.1.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors