Bug 11239
Summary: | w83793 -> kobject_add_internal failed for 0-004b with -EEXIST | ||
---|---|---|---|
Product: | Drivers | Reporter: | Ed Martin (edman007) |
Component: | I2C | Assignee: | Jean Delvare (jdelvare) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.26.1 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: | i2c: Check for address business before creating clients |
Description
Ed Martin
2008-08-03 00:52:41 UTC
Please provide a dump of your W83793 chip: modprobe i2c-dev i2cdump 0 0x2f b Did you pass any parameter when loading module w83793? Please also provide a scan of the SMBus: modprobe i2c-dev i2cdetect 0 And a list of registered i2c clients: grep . /sys/bus/i2c/devices/*/name root@octal:~$ i2cdump 0 0x2f b WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c/0, address 0x2f, mode byte Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 00 00 00 00 00 03 04 03 14 64 64 5e 73 a3 7b 12 .....????dd^s?{? 10: 8d 8d 88 ff 60 72 00 00 c9 cb 00 34 0b 09 00 00 ???.`r..??.4??.. 20: 2a 2b 00 0f ff 0f ff 0f ff 01 ab 01 b4 0f ff 03 *+.?.?.?.?????.? 30: 3f 03 44 0f ff 0f ff 0f ff 0f ff ff ff ff ff ff ??D?.?.?.?...... 40: 01 00 00 9c 3c 00 f7 ff ff 7f 3f 00 00 9c 3c 00 ?..?<.?..??..?<. 50: 00 00 00 00 00 00 00 00 28 01 00 00 7f 00 ff 03 ........(?..?..? 60: ff 00 ff 00 ff 00 ff ff 3f 00 ff 00 ff 00 ff 00 ........?....... 70: ff 00 ff 00 ff 00 ff 00 64 5f 55 50 64 5f 55 50 ........d_UPd_UP 80: 64 5f 55 50 64 5f 55 50 64 5f 55 50 64 5f 55 50 d_UPd_UPd_UPd_UP 90: 06 97 06 97 06 97 06 97 06 97 06 97 06 97 06 97 ???????????????? a0: 06 97 06 97 06 97 06 97 00 00 00 00 00 00 ff ff ????????........ b0: 00 00 30 1e 1e 1e 1e 1e 1e 1e 1e 89 89 89 89 89 ..0????????????? c0: 89 89 89 06 06 7f ff 00 00 ff ff ff ff ff ff ff ??????.......... d0: f0 40 40 40 40 10 c0 ff f2 c0 f2 40 80 01 80 01 ?@@@@??.???@???? e0: bb c0 82 ff 80 06 11 ff ff ff aa 4a ff ff ff ff ???.???...?J.... f0: 00 00 00 00 00 00 60 80 1b 00 ff 00 00 10 00 00 ......`??....?.. root@octal:~$ i2cdetect 0 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c/0. I will probe address range 0x03-0x77. Continue? [Y/n] 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- 2d -- 2f 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU UU -- UU -- -- -- UU 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: 60 61 62 -- -- -- -- -- -- 69 -- -- -- -- -- 6f 70: -- -- -- -- 74 75 -- -- root@octal:~$ grep . /sys/bus/i2c/devices/*/name /sys/bus/i2c/devices/0-0048/name:pcf8591 /sys/bus/i2c/devices/0-0049/name:pcf8591 /sys/bus/i2c/devices/0-004b/name:pcf8591 /sys/bus/i2c/devices/0-004f/name:pcf8591 OK, apparently you have the pcf8591 driver loaded and it picked the W83793's subclient addresses, so the w83793 driver can't access them. The workaround is to load the w83793 driver first: rmmod pcf8591 modprobe w83793 modprobe pcf8591 Please give it a try and confirm that it solves your problem. Still, loading the drivers in the wrong order shouldn't cause the error messages you got. I'll try to reproduce the problem. Actually you have to unload the w83793 driver as well, so that would be: rmmod pcf8591 w83793 modprobe w83793 modprobe pcf8591 Alternatively, you can prevent the pcf8591 driver from picking the wrong address by using the following option: modprobe pcf8591 ignore=0,0x4b,0,0x4f If you do that, then the drivers can be loaded in any order. Created attachment 17141 [details]
i2c: Check for address business before creating clients
Patch committed, fix will be in 2.6.27-rc3: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c1159f9e8927f5732c19816a605926bc76c498b2 Just verified this in 2.6.27-rc6, i don't see any problems anymore, its fixed |