diff options
| -rw-r--r-- | Documentation/hwmon/lm93 | 7 | ||||
| -rw-r--r-- | drivers/hwmon/Kconfig | 4 | ||||
| -rw-r--r-- | drivers/hwmon/lm93.c | 21 |
3 files changed, 28 insertions, 4 deletions
diff --git a/Documentation/hwmon/lm93 b/Documentation/hwmon/lm93 index 7a10616d0b44..f3b2ad2ceb01 100644 --- a/Documentation/hwmon/lm93 +++ b/Documentation/hwmon/lm93 | |||
| @@ -6,6 +6,10 @@ Supported chips: | |||
| 6 | Prefix 'lm93' | 6 | Prefix 'lm93' |
| 7 | Addresses scanned: I2C 0x2c-0x2e | 7 | Addresses scanned: I2C 0x2c-0x2e |
| 8 | Datasheet: http://www.national.com/ds.cgi/LM/LM93.pdf | 8 | Datasheet: http://www.national.com/ds.cgi/LM/LM93.pdf |
| 9 | * National Semiconductor LM94 | ||
| 10 | Prefix 'lm94' | ||
| 11 | Addresses scanned: I2C 0x2c-0x2e | ||
| 12 | Datasheet: http://www.national.com/ds.cgi/LM/LM94.pdf | ||
| 9 | 13 | ||
| 10 | Authors: | 14 | Authors: |
| 11 | Mark M. Hoffman <mhoffman@lightlink.com> | 15 | Mark M. Hoffman <mhoffman@lightlink.com> |
| @@ -56,6 +60,9 @@ previous motherboard management ASICs and uses some of the LM85's features | |||
| 56 | for dynamic Vccp monitoring and PROCHOT. It is designed to monitor a dual | 60 | for dynamic Vccp monitoring and PROCHOT. It is designed to monitor a dual |
| 57 | processor Xeon class motherboard with a minimum of external components. | 61 | processor Xeon class motherboard with a minimum of external components. |
| 58 | 62 | ||
| 63 | LM94 is also supported in LM93 compatible mode. Extra sensors and features of | ||
| 64 | LM94 are not supported. | ||
| 65 | |||
| 59 | 66 | ||
| 60 | User Interface | 67 | User Interface |
| 61 | -------------- | 68 | -------------- |
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 35f00dae3676..773e484f1646 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
| @@ -618,8 +618,8 @@ config SENSORS_LM93 | |||
| 618 | depends on I2C | 618 | depends on I2C |
| 619 | select HWMON_VID | 619 | select HWMON_VID |
| 620 | help | 620 | help |
| 621 | If you say yes here you get support for National Semiconductor LM93 | 621 | If you say yes here you get support for National Semiconductor LM93, |
| 622 | sensor chips. | 622 | LM94, and compatible sensor chips. |
| 623 | 623 | ||
| 624 | This driver can also be built as a module. If so, the module | 624 | This driver can also be built as a module. If so, the module |
| 625 | will be called lm93. | 625 | will be called lm93. |
diff --git a/drivers/hwmon/lm93.c b/drivers/hwmon/lm93.c index c9ed14eba5a6..3b43df418613 100644 --- a/drivers/hwmon/lm93.c +++ b/drivers/hwmon/lm93.c | |||
| @@ -135,6 +135,11 @@ | |||
| 135 | #define LM93_MFR_ID 0x73 | 135 | #define LM93_MFR_ID 0x73 |
| 136 | #define LM93_MFR_ID_PROTOTYPE 0x72 | 136 | #define LM93_MFR_ID_PROTOTYPE 0x72 |
| 137 | 137 | ||
| 138 | /* LM94 REGISTER VALUES */ | ||
| 139 | #define LM94_MFR_ID_2 0x7a | ||
| 140 | #define LM94_MFR_ID 0x79 | ||
| 141 | #define LM94_MFR_ID_PROTOTYPE 0x78 | ||
| 142 | |||
| 138 | /* SMBus capabilities */ | 143 | /* SMBus capabilities */ |
| 139 | #define LM93_SMBUS_FUNC_FULL (I2C_FUNC_SMBUS_BYTE_DATA | \ | 144 | #define LM93_SMBUS_FUNC_FULL (I2C_FUNC_SMBUS_BYTE_DATA | \ |
| 140 | I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_BLOCK_DATA) | 145 | I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_BLOCK_DATA) |
| @@ -2504,6 +2509,7 @@ static int lm93_detect(struct i2c_client *client, struct i2c_board_info *info) | |||
| 2504 | { | 2509 | { |
| 2505 | struct i2c_adapter *adapter = client->adapter; | 2510 | struct i2c_adapter *adapter = client->adapter; |
| 2506 | int mfr, ver; | 2511 | int mfr, ver; |
| 2512 | const char *name; | ||
| 2507 | 2513 | ||
| 2508 | if (!i2c_check_functionality(adapter, LM93_SMBUS_FUNC_MIN)) | 2514 | if (!i2c_check_functionality(adapter, LM93_SMBUS_FUNC_MIN)) |
| 2509 | return -ENODEV; | 2515 | return -ENODEV; |
| @@ -2517,13 +2523,23 @@ static int lm93_detect(struct i2c_client *client, struct i2c_board_info *info) | |||
| 2517 | } | 2523 | } |
| 2518 | 2524 | ||
| 2519 | ver = lm93_read_byte(client, LM93_REG_VER); | 2525 | ver = lm93_read_byte(client, LM93_REG_VER); |
| 2520 | if (ver != LM93_MFR_ID && ver != LM93_MFR_ID_PROTOTYPE) { | 2526 | switch (ver) { |
| 2527 | case LM93_MFR_ID: | ||
| 2528 | case LM93_MFR_ID_PROTOTYPE: | ||
| 2529 | name = "lm93"; | ||
| 2530 | break; | ||
| 2531 | case LM94_MFR_ID_2: | ||
| 2532 | case LM94_MFR_ID: | ||
| 2533 | case LM94_MFR_ID_PROTOTYPE: | ||
| 2534 | name = "lm94"; | ||
| 2535 | break; | ||
| 2536 | default: | ||
| 2521 | dev_dbg(&adapter->dev, | 2537 | dev_dbg(&adapter->dev, |
| 2522 | "detect failed, bad version id 0x%02x!\n", ver); | 2538 | "detect failed, bad version id 0x%02x!\n", ver); |
| 2523 | return -ENODEV; | 2539 | return -ENODEV; |
| 2524 | } | 2540 | } |
| 2525 | 2541 | ||
| 2526 | strlcpy(info->type, "lm93", I2C_NAME_SIZE); | 2542 | strlcpy(info->type, name, I2C_NAME_SIZE); |
| 2527 | dev_dbg(&adapter->dev,"loading %s at %d,0x%02x\n", | 2543 | dev_dbg(&adapter->dev,"loading %s at %d,0x%02x\n", |
| 2528 | client->name, i2c_adapter_id(client->adapter), | 2544 | client->name, i2c_adapter_id(client->adapter), |
| 2529 | client->addr); | 2545 | client->addr); |
| @@ -2602,6 +2618,7 @@ static int lm93_remove(struct i2c_client *client) | |||
| 2602 | 2618 | ||
| 2603 | static const struct i2c_device_id lm93_id[] = { | 2619 | static const struct i2c_device_id lm93_id[] = { |
| 2604 | { "lm93", 0 }, | 2620 | { "lm93", 0 }, |
| 2621 | { "lm94", 0 }, | ||
| 2605 | { } | 2622 | { } |
| 2606 | }; | 2623 | }; |
| 2607 | MODULE_DEVICE_TABLE(i2c, lm93_id); | 2624 | MODULE_DEVICE_TABLE(i2c, lm93_id); |
