]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/hwmon/emc1403.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / drivers / hwmon / emc1403.c
index 8dee3f38fdfb27e1c80a9fb36add60e414aeb805..cd2a6e437aecba36d2fa6f6a7022bfcd40e29d76 100644 (file)
@@ -269,23 +269,30 @@ static int emc1403_detect(struct i2c_client *client,
                        struct i2c_board_info *info)
 {
        int id;
-       /* Check if thermal chip is SMSC and EMC1403 */
+       /* Check if thermal chip is SMSC and EMC1403 or EMC1423 */
 
        id = i2c_smbus_read_byte_data(client, THERMAL_SMSC_ID_REG);
        if (id != 0x5d)
                return -ENODEV;
 
+       id = i2c_smbus_read_byte_data(client, THERMAL_PID_REG);
+       switch (id) {
+       case 0x21:
+               strlcpy(info->type, "emc1403", I2C_NAME_SIZE);
+               break;
+       case 0x23:
+               strlcpy(info->type, "emc1423", I2C_NAME_SIZE);
+               break;
        /* Note: 0x25 is the 1404 which is very similar and this
           driver could be extended */
-       id = i2c_smbus_read_byte_data(client, THERMAL_PID_REG);
-       if (id != 0x21)
+       default:
                return -ENODEV;
+       }
 
        id = i2c_smbus_read_byte_data(client, THERMAL_REVISION_REG);
        if (id != 0x01)
                return -ENODEV;
 
-       strlcpy(info->type, "emc1403", I2C_NAME_SIZE);
        return 0;
 }
 
@@ -337,11 +344,12 @@ static int emc1403_remove(struct i2c_client *client)
 }
 
 static const unsigned short emc1403_address_list[] = {
-       0x18, 0x2a, 0x4c, 0x4d, I2C_CLIENT_END
+       0x18, 0x29, 0x4c, 0x4d, I2C_CLIENT_END
 };
 
 static const struct i2c_device_id emc1403_idtable[] = {
        { "emc1403", 0 },
+       { "emc1423", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, emc1403_idtable);