2

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?

  • 1
    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 6 '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 4 '17 at 0:24
  • @ILMostro_7: The question is from 2014 ... – dirkt Nov 4 '17 at 8:05
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.