How do I disable I2C Designware support when it's not built as a module?
After reading kernel sources, I found a function we need to blacklist!
Thanks to Stephen Kitt for the hint about initcall_blacklist
.
Add initcall_blacklist=dw_i2c_init_driver
to the kernel command line. This works for me on kernel 4.15.0.
For anyone else who'll find this answer. You can do it by editing /etc/default/grub
:
- Run in the terminal:
sudo -H gedit /etc/default/grub
. - Append blacklist string to the
GRUB_CMDLINE_LINUX_DEFAULT
:GRUB_CMDLINE_LINUX_DEFAULT="… initcall_blacklist=dw_i2c_init_driver"
. - Save the file, close the editor.
- Run in the terminal:
sudo update-grub
. - Reboot and test!
Adding initcall_blacklist=i2c_dw_init_master
to the kernel command-line should stop the Designware driver from initialising during boot, and avoid the issue altogether.
See the kernel parameters for a very brief description of initcall_blacklist
, and the thread around the patch for more useful background information.