mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-30 13:00:30 +00:00
add check for duplicate subclient addresses and add printk's
to report subclient registration failures git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1127 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
99698b4bfa
commit
bd63a9d9fc
2 files changed
+17
-6
No files matched your search
@@ -24,6 +24,7 @@ ask CVS about it:
|
||||
File doc/FAQ: Many, many updates and additions
|
||||
File doc/busses/i2c-sis5595: new
|
||||
File doc/busses/i2c-tsunami: new
|
||||
File doc/chips/it87: new
|
||||
File doc/chips/via686a: Claim support for 686b.
|
||||
File README.thinkpad: new
|
||||
File sensors.conf.eg: Adjust as99127f in5 (-12V) and temp2 calculations;
|
||||
@@ -37,7 +38,8 @@ ask CVS about it:
|
||||
Add support for maxilife-nba and amd1024;
|
||||
Change from sensors_* to i2c_* globals for new i2c-proc.[ch]
|
||||
Chip Modules (all ISA): Remove #include "i2c-isa.h"
|
||||
Chip Modules (all): Change from sensors_* to i2c_* globals for new i2c-proc.[ch]
|
||||
Chip Modules (all): Change from sensors_* to i2c_* globals
|
||||
for new i2c-proc.[ch]
|
||||
Makefiles: enhance to support Alpha architecture
|
||||
Module adm1021: Fix lm84 and gl523sm support
|
||||
Module adm1024: new
|
||||
@@ -60,7 +62,8 @@ ask CVS about it:
|
||||
Allow force_addr=0xaddr
|
||||
Module via686a: Allow force_addr=0xaddr (for A7V/K7V boards)
|
||||
Module w83781d: Don't reinitialize as99127f chip; this may cause fan/temp
|
||||
reading changes
|
||||
reading changes; Add messages for subclient
|
||||
registration failure
|
||||
Programs i2cdetect, i2cdump: add devfs /dev/i2c/x support
|
||||
Program i2cset: new
|
||||
Program isadump: fix for Alpha arch. compiles
|
||||
|
||||
+12
-4
@@ -885,11 +885,17 @@ int w83781d_detect(struct i2c_adapter *adapter, int address,
|
||||
err = -ENOMEM;
|
||||
goto ERROR4;
|
||||
}
|
||||
val1 =
|
||||
w83781d_read_value(new_client,
|
||||
W83781D_REG_I2C_SUBADDR);
|
||||
val1 = w83781d_read_value(new_client,
|
||||
W83781D_REG_I2C_SUBADDR);
|
||||
data->lm75[0].addr = 0x48 + (val1 & 0x07);
|
||||
data->lm75[1].addr = 0x48 + ((val1 >> 4) & 0x07);
|
||||
if (kind != w83783s) {
|
||||
data->lm75[1].addr = 0x48 + ((val1 >> 4) & 0x07);
|
||||
if(data->lm75[0].addr == data->lm75[1].addr) {
|
||||
printk("w83781d.o: Duplicate addresses 0x%x for subclients.\n",
|
||||
data->lm75[i].addr);
|
||||
goto ERROR5;
|
||||
}
|
||||
}
|
||||
if (kind == w83781d)
|
||||
client_name = "W83781D subclient";
|
||||
else if (kind == w83782d)
|
||||
@@ -909,6 +915,8 @@ int w83781d_detect(struct i2c_adapter *adapter, int address,
|
||||
strcpy(data->lm75[i].name, client_name);
|
||||
data->lm75[i].id = w83781d_id++;
|
||||
if ((err = i2c_attach_client(&(data->lm75[i])))) {
|
||||
printk("w83781d.o: Subclient %d registration at address 0x%x failed.\n",
|
||||
i, data->lm75[i].addr);
|
||||
if (i == 1)
|
||||
goto ERROR6;
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user