mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-08 16:11:26 +00:00
(Phil) Added driver for ADM9240. It isn't full tested, but it is
mostly there and working. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@154 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
899ca67043
commit
ff2c35a40b
8 files changed
+1504
-10
No files matched your search
@@ -184,7 +184,7 @@ extern inline s32 smbus_read_byte(struct i2c_adapter * adapter,u8 addr)
|
||||
if (smbus_access(adapter,addr,SMBUS_READ,0,SMBUS_BYTE,&data))
|
||||
return -1;
|
||||
else
|
||||
return data.byte;
|
||||
return 0x0FF & data.byte;
|
||||
}
|
||||
|
||||
extern inline s32 smbus_write_byte(struct i2c_adapter * adapter, u8 addr,
|
||||
@@ -200,7 +200,7 @@ extern inline s32 smbus_read_byte_data(struct i2c_adapter * adapter,
|
||||
if (smbus_access(adapter,addr,SMBUS_READ,command,SMBUS_BYTE_DATA,&data))
|
||||
return -1;
|
||||
else
|
||||
return data.byte;
|
||||
return 0x0FF & data.byte;
|
||||
}
|
||||
|
||||
extern inline s32 smbus_write_byte_data(struct i2c_adapter * adapter,
|
||||
@@ -218,7 +218,7 @@ extern inline s32 smbus_read_word_data(struct i2c_adapter * adapter,
|
||||
if (smbus_access(adapter,addr,SMBUS_READ,command,SMBUS_WORD_DATA,&data))
|
||||
return -1;
|
||||
else
|
||||
return data.word;
|
||||
return 0x0FFFF & data.word;
|
||||
}
|
||||
|
||||
extern inline s32 smbus_write_word_data(struct i2c_adapter * adapter,
|
||||
@@ -237,7 +237,7 @@ extern inline s32 smbus_process_call(struct i2c_adapter * adapter,
|
||||
if (smbus_access(adapter,addr,SMBUS_WRITE,command,SMBUS_PROC_CALL,&data))
|
||||
return -1;
|
||||
else
|
||||
return data.word;
|
||||
return 0x0FFFF & data.word;
|
||||
}
|
||||
|
||||
/* Returns the number of read bytes */
|
||||
|
||||
Reference in new issue
Block a user