hwmon: (lm93) Add support for LM94
Subsystems (2)
PATCH v2 1/1 hwmon: (lm93) Add support for LM94
This patch adds basic support for LM94 to the LM93 driver. LM94 specific sensors and features are not supported.
---
v2: Add additional MFR_ID value 0x7a for LM94
Documentation/hwmon/lm93 | 7 +++++++ drivers/hwmon/lm93.c | 21 +++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)
Documentation/hwmon/lm93 +7 -0
@@ -6,6 +6,10 @@ Supported chips: Prefix 'lm93' Addresses scanned: I2C 0x2c-0x2e Datasheet: http://www.national.com/ds.cgi/LM/LM93.pdf + * National Semiconductor LM94 + Prefix 'lm94' + Addresses scanned: I2C 0x2c-0x2e + Datasheet: http://www.national.com/ds.cgi/LM/LM94.pdf Authors: Mark M. Hoffman <[email protected]>
@@ -56,6 +60,9 @@ previous motherboard management ASICs and uses some of the LM85's features for dynamic Vccp monitoring and PROCHOT. It is designed to monitor a dual processor Xeon class motherboard with a minimum of external components. +LM94 is also supported in LM93 compatible mode. Extra sensors and features of +LM94 are not supported. + User Interface --------------
drivers/hwmon/lm93.c +19 -2
@@ -135,6 +135,11 @@#define LM93_MFR_ID 0x73#define LM93_MFR_ID_PROTOTYPE 0x72 +/* LM94 REGISTER VALUES */ +#define LM94_MFR_ID_2 0x7a +#define LM94_MFR_ID 0x79 +#define LM94_MFR_ID_PROTOTYPE 0x78 +/* SMBus capabilities */ #define LM93_SMBUS_FUNC_FULL (I2C_FUNC_SMBUS_BYTE_DATA | \ 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) {struct i2c_adapter *adapter = client->adapter;int mfr, ver; +const char *name;if (!i2c_check_functionality (adapter,LM93_SMBUS_FUNC_MIN ))return -ENODEV ;
@@ -2517,13 +2523,23 @@ static int lm93_detect(struct i2c_client *client, struct i2c_board_info *info) } ver =lm93_read_byte (client,LM93_REG_VER ); -if (ver !=LM93_MFR_ID && ver !=LM93_MFR_ID_PROTOTYPE ) { +switch (ver) { +case LM93_MFR_ID : +case LM93_MFR_ID_PROTOTYPE : + name ="lm93" ; +break ; +case LM94_MFR_ID_2 : +case LM94_MFR_ID : +case LM94_MFR_ID_PROTOTYPE : + name ="lm94" ; +break ; +default :dev_dbg (&adapter->dev,"detect failed, bad version id 0x%02x!\n" , ver);return -ENODEV ; } -strlcpy (info->type,"lm93" ,I2C_NAME_SIZE ); +strlcpy (info->type, name,I2C_NAME_SIZE );dev_dbg (&adapter->dev,"loading %s at %d,0x%02x\n" , client->name,i2c_adapter_id (client->adapter), client->addr);
@@ -2602,6 +2618,7 @@ static int lm93_remove(struct i2c_client *client)static const struct i2c_device_id lm93_id[] = { {"lm93" ,0 }, + {"lm94" ,0 }, { } };MODULE_DEVICE_TABLE (i2c, lm93_id);
Signature · 7 lines
1.7.3.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Guenter,
Quoted 10 lines · Guenter Roeck
This patch adds basic support for LM94 to the LM93 driver. LM94 specific sensors and features are not supported.
Signed-off-by Guenter Roeck <[email protected]>---
v2: Add additionalMFR_IDvalue0x7afor LM94Documentation/hwmon/lm93 | 7 +++++++ drivers/hwmon/lm93.c | 21 +++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)
Looks good,
though a mention of the LM94 in drivers/hwmon/Kconfig would be nice to add?
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 14 lines · Jean Delvare
Hi Guenter,
Quoted 10 lines · Guenter Roeck
This patch adds basic support for LM94 to the LM93 driver. LM94 specific sensors and features are not supported.
Signed-off-by Guenter Roeck <[email protected]>---
v2: Add additionalMFR_IDvalue0x7afor LM94Documentation/hwmon/lm93 | 7 +++++++ drivers/hwmon/lm93.c | 21 +++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)
Quoted 7 lines
Looks good,
Acked-by Jean Delvare <[email protected]>though a mention of the LM94 in
drivers/hwmon/Kconfigwould be nice to add?
Done and applied to -next.
Wonder if I should ask Linus to include it in .38. Thoughts ?
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 11 lines · Guenter Roeck
Quoted 6 lines · Jean Delvare
Looks good,
Acked-by Jean Delvare <[email protected]>though a mention of the LM94 in
drivers/hwmon/Kconfigwould be nice to add?Done and applied to -next.
Wonder if I should ask Linus to include it in .38. Thoughts ?
2.6.38-rc1 isn't even out yet, so that's definitely an option.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors