hwmon: (pmbus/max16601) Add support for new revisions of MAX16508
authorGuenter Roeck <linux@roeck-us.net>
Fri, 9 Jun 2023 18:24:47 +0000 (11:24 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 10 Jun 2023 15:28:14 +0000 (08:28 -0700)
New revisions of MAX16508 report MAX16508.xx or MAX16508y.xx as device ID,
but are functionally similar to MAX16508. Add support for those chip
variants.

Cc: Vlad Sytchenko <vsytch@google.com>
Cc: Steve Foreman <foremans@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/max16601.c

index 9b0177409109b72cb2419853369a617b7150c53d..3ab2195046007a5c9e9611616322eaf10f17ec58 100644 (file)
@@ -283,10 +283,10 @@ static int max16601_get_id(struct i2c_client *client)
                return -ENODEV;
 
        /*
-        * PMBUS_IC_DEVICE_ID is expected to return MAX1660[012]y.xx" or
-        * "MAX16500y.xx".cdxxcccccccccc
+        * PMBUS_IC_DEVICE_ID is expected to return MAX1660[012]y.xx",
+        * "MAX16500y.xx".cdxxcccccccccc, or "MAX16508y.xx".
         */
-       if (!strncmp(buf, "MAX16500", 8)) {
+       if (!strncmp(buf, "MAX16500", 8) || !strncmp(buf, "MAX16508", 8)) {
                id = max16508;
        } else if (!strncmp(buf, "MAX16600", 8)) {
                id = max16600;