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?