From: Anders Berg <anders.b...@lsi.com>

Recognize chip id for newer revision of LTC2974.

Signed-off-by: Anders Berg <anders.b...@lsi.com>
---
 drivers/hwmon/pmbus/ltc2978.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
index 586a89e..7dad0ab 100644
--- a/drivers/hwmon/pmbus/ltc2978.c
+++ b/drivers/hwmon/pmbus/ltc2978.c
@@ -52,7 +52,8 @@ enum chips { ltc2974, ltc2978, ltc3880, ltc3883 };
 /* LTC3883 only */
 #define LTC3883_MFR_IIN_PEAK           0xe1
 
-#define LTC2974_ID                     0x0212
+#define LTC2974_ID_REV1                        0x0212
+#define LTC2974_ID_REV2                        0x0213
 #define LTC2978_ID_REV1                        0x0121
 #define LTC2978_ID_REV2                        0x0122
 #define LTC3880_ID                     0x4000
@@ -390,7 +391,7 @@ static int ltc2978_probe(struct i2c_client *client,
        if (chip_id < 0)
                return chip_id;
 
-       if (chip_id == LTC2974_ID) {
+       if (chip_id == LTC2974_ID_REV1 || chip_id == LTC2974_ID_REV2) {
                data->id = ltc2974;
        } else if (chip_id == LTC2978_ID_REV1 || chip_id == LTC2978_ID_REV2) {
                data->id = ltc2978;
-- 
1.7.9.5

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to