mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-12-04 21:58:18 +00:00
LM75 data correctly readable now!
* Changed test in lm75 setup code to 'read/write returns < 0' instead of (old) 'read/write returns 0xff'. Nowadays, we can see the difference between an error and a 0xff result, after all. * Introduced constants used by PIIX4 for transaction types. These are *not* the same as those in smbus.h. * Some small code optimalizations in piix4.o. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@40 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
e0484650ef
commit
ce0521ba13
4 files changed
+78
-46
No files matched your search
+2
-1
@@ -122,7 +122,7 @@ int lm75_attach_adapter(struct i2c_adapter *adapter)
|
||||
/* Later on, we will keep a list of registered addresses for each
|
||||
adapter, and check whether they are used here */
|
||||
|
||||
if (smbus_read_byte_data(adapter,address,LM75_REG_CONF) == 0xff)
|
||||
if (smbus_read_byte_data(adapter,address,LM75_REG_CONF) < 0)
|
||||
continue;
|
||||
|
||||
/* Real detection code goes here */
|
||||
@@ -167,6 +167,7 @@ int lm75_attach_adapter(struct i2c_adapter *adapter)
|
||||
lm75_dir_table_template)) < 0)
|
||||
goto ERROR3;
|
||||
data->sysctl_id = err;
|
||||
err = 0;
|
||||
|
||||
/* Initialize the LM75 chip */
|
||||
lm75_write_value(new_client,LM75_REG_TEMP_OS,LM75_INIT_TEMP_OS);
|
||||
|
||||
Reference in new issue
Block a user