diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-09-23 10:56:48 -0700 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-10-18 09:12:03 -0700 |
commit | c24c407e963e73d3ad18b9bc0af32cf23f37a7b0 (patch) | |
tree | c9c9be213ffdc875f9db74d9371c53c96dec9b23 /drivers/hwmon | |
parent | c8ccab7ab5c71b4fab274bfd18425503a4dcc288 (diff) |
hwmon: (pmbus/ltc2978): Add support for LTC2977
LTC2977 is a pin compatible replacement for LTC2978.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/pmbus/ltc2978.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c index 586a89ef9e0f..e05ff565ef61 100644 --- a/drivers/hwmon/pmbus/ltc2978.c +++ b/drivers/hwmon/pmbus/ltc2978.c @@ -1,5 +1,6 @@ /* - * Hardware monitoring driver for LTC2974, LTC2978, LTC3880, and LTC3883 + * Hardware monitoring driver for LTC2974, LTC2977, LTC2978, LTC3880, + * and LTC3883 * * Copyright (c) 2011 Ericsson AB. * Copyright (c) 2013 Guenter Roeck @@ -27,7 +28,7 @@ #include <linux/i2c.h> #include "pmbus.h" -enum chips { ltc2974, ltc2978, ltc3880, ltc3883 }; +enum chips { ltc2974, ltc2977, ltc2978, ltc3880, ltc3883 }; /* Common for all chips */ #define LTC2978_MFR_VOUT_PEAK 0xdd @@ -35,7 +36,7 @@ enum chips { ltc2974, ltc2978, ltc3880, ltc3883 }; #define LTC2978_MFR_TEMPERATURE_PEAK 0xdf #define LTC2978_MFR_SPECIAL_ID 0xe7 -/* LTC2974 and LTC2978 */ +/* LTC2974, LCT2977, and LTC2978 */ #define LTC2978_MFR_VOUT_MIN 0xfb #define LTC2978_MFR_VIN_MIN 0xfc #define LTC2978_MFR_TEMPERATURE_MIN 0xfd @@ -53,6 +54,7 @@ enum chips { ltc2974, ltc2978, ltc3880, ltc3883 }; #define LTC3883_MFR_IIN_PEAK 0xe1 #define LTC2974_ID 0x0212 +#define LTC2977_ID 0x0130 #define LTC2978_ID_REV1 0x0121 #define LTC2978_ID_REV2 0x0122 #define LTC3880_ID 0x4000 @@ -363,6 +365,7 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page, static const struct i2c_device_id ltc2978_id[] = { {"ltc2974", ltc2974}, + {"ltc2977", ltc2977}, {"ltc2978", ltc2978}, {"ltc3880", ltc3880}, {"ltc3883", ltc3883}, @@ -392,6 +395,8 @@ static int ltc2978_probe(struct i2c_client *client, if (chip_id == LTC2974_ID) { data->id = ltc2974; + } else if (chip_id == LTC2977_ID) { + data->id = ltc2977; } else if (chip_id == LTC2978_ID_REV1 || chip_id == LTC2978_ID_REV2) { data->id = ltc2978; } else if ((chip_id & LTC3880_ID_MASK) == LTC3880_ID) { @@ -438,6 +443,7 @@ static int ltc2978_probe(struct i2c_client *client, | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT; } break; + case ltc2977: case ltc2978: info->read_word_data = ltc2978_read_word_data; info->pages = LTC2978_NUM_PAGES; |