[i2c] Unprobable chips and new style i2c drivers

Jean Delvare khali at linux-fr.org
Sun Nov 18 21:36:10 CET 2007

Hi Jon,

On Fri, 16 Nov 2007 09:55:44 -0500, Jon Smirl wrote:
> How do new style drivers work with unprobable devices? Say I have an
> x86 kernel with all of the i2c drivers compiled in. The correct bus
> driver will be loaded by the platform code. How do the non-probable
> chip drivers get told that the device is there? With old style drivers
> I could use a kernel parameter to set the address.

With new-style drivers, you have two options:
* Declare the devices in platform-specific files, using
* Call i2c_new_device().

For the details, please read Documentation/i2c/writing-clients.

In the long run we'll also have the possibility to instantiate devices
from user-space, however this method will have some limitations, as you
won't be able to pass driver-specific data that way. I still couldn't
find the time to work on this, anyway.

Jean Delvare

More information about the i2c mailing list