3

I want to communicate over a I2C bus using Python. But the address cannot be used because it is used by another driver.

# i2cdetect -y 0
    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --    

# i2cget -y 0 0x1b
Error: Could not set address to 0x1b: Device or resource busy

I've followed in instructions in this answer.

# cat /sys/bus/i2c/devices/0-001b/modalias 
wm8731

According to the author of that answer wm8731 is "the name of the kernel driver that is keeping this device busy". Disabling this module does not work:

# rmmod wm8731
Error: Module wm8731 is not currently loaded

How do I disable the driver for this address?

OrangeTux
  • 1,063
  • 2
    A driver is not necessarily a module and therefore can't necessarily be unloaded. It's seems unlikely that this would be built in unless you are using a kernel made for a specific SoC. – goldilocks Dec 06 '14 at 16:11
  • Can you provide additional details about the specific system? Maybe you'd be able to get more input. – ILMostro_7 Nov 04 '17 at 00:24
  • @ILMostro_7: The question is from 2014 ... – dirkt Nov 04 '17 at 08:05

1 Answers1

2

You have to rebuild your kernel after disabling that driver from the kernel source code which is in kernel config file