Hi,

On Thu, Jul 24, 2008 at 3:52 PM,  <[EMAIL PROTECTED]> wrote:
> So, I added the register_board_info in my board init function.
> I fill the i2c_board_info structure with the macro I2C_BOARD_INFO.
> I define a few clients.

hmm... ok

>
> And so what ?
>
> The system is supposed to call the probe(client) of the driver ?

yes, if you have the proper struct i2c_driver and struct i2c_device_id in
your driver the i2c subsystem should call the probe of your device.

check drivers/i2c/chips/menelaus.c for an example.

See how I2C_BOARD_INFO() in arch/arm/mach-omap2/board-h4
and struct i2c_device_id have the same name for the device (menelaus).

> I am really lost. I did not anderstand how to get a valid client instance.
> I suppose the I2C layer says "Hey boy, you have a new client !", but when ?

no, i2c layer will call device probe based on the driver name being the same in
i2c_board_info and i2c_device_id (if I'm not wrong that's the match,
Jean correct
me if I'm wrong).

> What about 'static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END
> };'.
> Can it help me ?

That's old style i2c driver. You don't need that anymore ;-)

-- 
Best Regards,

Felipe Balbi
[EMAIL PROTECTED]

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

Reply via email to