mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-19 11:19:31 +00:00
lm90: Use generic i2c reads during detection (2.6 backport).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5120 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
15d2b1d2a6
commit
ca3f53c26d
2 files changed
+13
-12
No files matched your search
@@ -13,6 +13,7 @@ SVN-HEAD
|
||||
Recognize VGN as a valid Sony Vaio name prefix (2.6 backport)
|
||||
Module gl518sm: Fix fan speed reading (2.6 backport)
|
||||
Module gl520sm: Fix fan speed reading (2.6 backport)
|
||||
Module lm90: Use generic i2c reads during detection (2.6 backport)
|
||||
Program decode-dimms.pl: Fix DDR2 SDRAM module speed decoding
|
||||
Update manufacturer IDs.
|
||||
Program decode-vaio.pl: Private data might not be readable by non-root users
|
||||
|
||||
+12
-12
@@ -395,23 +395,23 @@ static int lm90_detect(struct i2c_adapter *adapter, int address,
|
||||
kind = lm90;
|
||||
|
||||
if (kind < 0) { /* detection and identification */
|
||||
u8 man_id, chip_id, reg_config1, reg_convrate;
|
||||
int man_id, chip_id, reg_config1, reg_convrate;
|
||||
|
||||
if (lm90_read_reg(new_client, LM90_REG_R_MAN_ID,
|
||||
&man_id) < 0
|
||||
|| lm90_read_reg(new_client, LM90_REG_R_CHIP_ID,
|
||||
&chip_id) < 0
|
||||
|| lm90_read_reg(new_client, LM90_REG_R_CONFIG1,
|
||||
®_config1) < 0
|
||||
|| lm90_read_reg(new_client, LM90_REG_R_CONVRATE,
|
||||
®_convrate) < 0)
|
||||
if ((man_id = i2c_smbus_read_byte_data(new_client,
|
||||
LM90_REG_R_MAN_ID)) < 0
|
||||
|| (chip_id = i2c_smbus_read_byte_data(new_client,
|
||||
LM90_REG_R_CHIP_ID)) < 0
|
||||
|| (reg_config1 = i2c_smbus_read_byte_data(new_client,
|
||||
LM90_REG_R_CONFIG1)) < 0
|
||||
|| (reg_convrate = i2c_smbus_read_byte_data(new_client,
|
||||
LM90_REG_R_CONVRATE)) < 0)
|
||||
goto exit_free;
|
||||
|
||||
if (man_id == 0x01) { /* National Semiconductor */
|
||||
u8 reg_config2;
|
||||
int reg_config2;
|
||||
|
||||
if (lm90_read_reg(new_client, LM90_REG_R_CONFIG2,
|
||||
®_config2) < 0)
|
||||
if ((reg_config2 = i2c_smbus_read_byte_data(new_client,
|
||||
LM90_REG_R_CONFIG2)) < 0)
|
||||
goto exit_free;
|
||||
|
||||
if ((reg_config1 & 0x2A) == 0x00
|
||||
|
||||
Reference in new issue
Block a user