diff options
| -rw-r--r-- | drivers/hwmon/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/hwmon/lm85.c | 23 |
2 files changed, 22 insertions, 3 deletions
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 5eadb007e542..297bc9a7d6e6 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
| @@ -575,7 +575,7 @@ config SENSORS_LM85 | |||
| 575 | help | 575 | help |
| 576 | If you say yes here you get support for National Semiconductor LM85 | 576 | If you say yes here you get support for National Semiconductor LM85 |
| 577 | sensor chips and clones: ADM1027, ADT7463, ADT7468, EMC6D100, | 577 | sensor chips and clones: ADM1027, ADT7463, ADT7468, EMC6D100, |
| 578 | EMC6D101 and EMC6D102. | 578 | EMC6D101, EMC6D102, and EMC6D103. |
| 579 | 579 | ||
| 580 | This driver can also be built as a module. If so, the module | 580 | This driver can also be built as a module. If so, the module |
| 581 | will be called lm85. | 581 | will be called lm85. |
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c index 1e229847f37a..d2cc28660816 100644 --- a/drivers/hwmon/lm85.c +++ b/drivers/hwmon/lm85.c | |||
| @@ -41,7 +41,7 @@ static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; | |||
| 41 | enum chips { | 41 | enum chips { |
| 42 | any_chip, lm85b, lm85c, | 42 | any_chip, lm85b, lm85c, |
| 43 | adm1027, adt7463, adt7468, | 43 | adm1027, adt7463, adt7468, |
| 44 | emc6d100, emc6d102 | 44 | emc6d100, emc6d102, emc6d103 |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | /* The LM85 registers */ | 47 | /* The LM85 registers */ |
| @@ -90,6 +90,9 @@ enum chips { | |||
| 90 | #define LM85_VERSTEP_EMC6D100_A0 0x60 | 90 | #define LM85_VERSTEP_EMC6D100_A0 0x60 |
| 91 | #define LM85_VERSTEP_EMC6D100_A1 0x61 | 91 | #define LM85_VERSTEP_EMC6D100_A1 0x61 |
| 92 | #define LM85_VERSTEP_EMC6D102 0x65 | 92 | #define LM85_VERSTEP_EMC6D102 0x65 |
| 93 | #define LM85_VERSTEP_EMC6D103_A0 0x68 | ||
| 94 | #define LM85_VERSTEP_EMC6D103_A1 0x69 | ||
| 95 | #define LM85_VERSTEP_EMC6D103S 0x6A /* Also known as EMC6D103:A2 */ | ||
| 93 | 96 | ||
| 94 | #define LM85_REG_CONFIG 0x40 | 97 | #define LM85_REG_CONFIG 0x40 |
| 95 | 98 | ||
| @@ -348,6 +351,7 @@ static const struct i2c_device_id lm85_id[] = { | |||
| 348 | { "emc6d100", emc6d100 }, | 351 | { "emc6d100", emc6d100 }, |
| 349 | { "emc6d101", emc6d100 }, | 352 | { "emc6d101", emc6d100 }, |
| 350 | { "emc6d102", emc6d102 }, | 353 | { "emc6d102", emc6d102 }, |
| 354 | { "emc6d103", emc6d103 }, | ||
| 351 | { } | 355 | { } |
| 352 | }; | 356 | }; |
| 353 | MODULE_DEVICE_TABLE(i2c, lm85_id); | 357 | MODULE_DEVICE_TABLE(i2c, lm85_id); |
| @@ -1250,6 +1254,20 @@ static int lm85_detect(struct i2c_client *client, struct i2c_board_info *info) | |||
| 1250 | case LM85_VERSTEP_EMC6D102: | 1254 | case LM85_VERSTEP_EMC6D102: |
| 1251 | type_name = "emc6d102"; | 1255 | type_name = "emc6d102"; |
| 1252 | break; | 1256 | break; |
| 1257 | case LM85_VERSTEP_EMC6D103_A0: | ||
| 1258 | case LM85_VERSTEP_EMC6D103_A1: | ||
| 1259 | type_name = "emc6d103"; | ||
| 1260 | break; | ||
| 1261 | /* | ||
| 1262 | * Registers apparently missing in EMC6D103S/EMC6D103:A2 | ||
| 1263 | * compared to EMC6D103:A0, EMC6D103:A1, and EMC6D102 | ||
| 1264 | * (according to the data sheets), but used unconditionally | ||
| 1265 | * in the driver: 62[5:7], 6D[0:7], and 6E[0:7]. | ||
| 1266 | * So skip EMC6D103S for now. | ||
| 1267 | case LM85_VERSTEP_EMC6D103S: | ||
| 1268 | type_name = "emc6d103s"; | ||
| 1269 | break; | ||
| 1270 | */ | ||
| 1253 | } | 1271 | } |
| 1254 | } else { | 1272 | } else { |
| 1255 | dev_dbg(&adapter->dev, | 1273 | dev_dbg(&adapter->dev, |
| @@ -1283,6 +1301,7 @@ static int lm85_probe(struct i2c_client *client, | |||
| 1283 | case adt7468: | 1301 | case adt7468: |
| 1284 | case emc6d100: | 1302 | case emc6d100: |
| 1285 | case emc6d102: | 1303 | case emc6d102: |
| 1304 | case emc6d103: | ||
| 1286 | data->freq_map = adm1027_freq_map; | 1305 | data->freq_map = adm1027_freq_map; |
| 1287 | break; | 1306 | break; |
| 1288 | default: | 1307 | default: |
| @@ -1468,7 +1487,7 @@ static struct lm85_data *lm85_update_device(struct device *dev) | |||
| 1468 | /* More alarm bits */ | 1487 | /* More alarm bits */ |
| 1469 | data->alarms |= lm85_read_value(client, | 1488 | data->alarms |= lm85_read_value(client, |
| 1470 | EMC6D100_REG_ALARM3) << 16; | 1489 | EMC6D100_REG_ALARM3) << 16; |
| 1471 | } else if (data->type == emc6d102) { | 1490 | } else if (data->type == emc6d102 || data->type == emc6d103) { |
| 1472 | /* Have to read LSB bits after the MSB ones because | 1491 | /* Have to read LSB bits after the MSB ones because |
| 1473 | the reading of the MSB bits has frozen the | 1492 | the reading of the MSB bits has frozen the |
| 1474 | LSBs (backward from the ADM1027). | 1493 | LSBs (backward from the ADM1027). |
