Skip to contentSkip to conversation

New Style I2C Driver : how to get clients ?

DISCUSSION [email protected] 2 participants 2 messages Jul 24, 2008 1 message not in the archive I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

Hello,

I am currently writing a I2C driver for a custom embedded board. I have read lot about writing I2C driver using Linux I2C layer.

But there are still a few things I don't anderstand. I am quite confuse.

I have written an algorithm and an adapter. For instance, I just register my adapter on the module_init.

- Is it important for adapters to be registred as platform_driver ?
- Will it remove the 'forgot to specify physical address' error ?
- Can I ignore 'forgot to specify physical address' error ?

For my driver, I only implement probe(client) and remove(client).

They are never called !!

I thought the I2C layer register automatically the I2C devices present on the bus.
Am I wrong ?

- How can I specify the addresses of my I2C clients ?
- What about i2c_probe ? Do I need to call it directly ?

Thank you for help.

Best regards.

Légion.

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

A message that is not in the archive (sent off-list or not yet received): 1216890432.48884640c4486-HZaT1/[email protected]

#2 lore raw

Hi,

Quoted 2 lines · On Thu, Jul 24, 2008 at 12:07 PM, <[email protected]> wrote:

- How can I specify the addresses of my I2C clients ?
- What about i2c_probe ? Do I need to call it directly ?

basically you i2c_register_board_info() from the board file.

Take a look at arch/arm/mach-omap2/board-h2.c for
a simple example.

you'll see that it calls omap_register_i2c_bus(), but it's just a wrapper for omap-specific initializations on top of i2c_register_board_info();

Signature · 9 lines
Best Regards,

Felipe Balbi
[email protected]

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