The power conditions are that the i2c device(slave) is powered off and the host controller is on. And kernel module should be loaded while booting. When ever new i2c device(slave) is inserted/poweredON, kernel has to detect slave device dynamically just like USB. How to write a device driver or kernel module for this?. Is there any method to achieve these? Please help me i am new to this driver programing. Thanks
Asked
Active
Viewed 92 times
0
-
1i2c is not a discoverable bus, you can't do that in a generic way and this is not supported by the kernel itself. You could however poll for an known i2c devices and bind the proper driver to the i2c adresses. This would only work for simple device and and more advanced description may be needed for more complex devices (e.g DT overlays) – Alexandre Belloni Aug 17 '21 at 10:48
-
This is not possible unless your i2c device has the ability to respond to some sort of poll or interrogation. Very few will have. – Chenmunka Aug 17 '21 at 11:43
-
Thank you so much for your response it really helped a lot. – HarshaFeliz Aug 19 '21 at 11:24