Re: [PATCH][2.6] Add command function to struct i2c_adapter

From: Adrian Cox
Date: Thu Sep 23 2004 - 22:43:47 EST


On Thu, 2004-09-23 at 08:09, Michael Hunold wrote:
> We need to keep in mind, that the adapter interface must be a per-client
> interface. On PCI devices it's simple: you have a i2c bus bound to a dvb
> card and know which chipsets can be there. The bus is dvb specific.
>
> On embedded platforms, however, you usually have one one i2c bus, where
> everything is present: dvb frontends, audio/video multiplexers,
> digital/analog audio converters, stuff like that.
>
> So if you create *the* i2c bus and invite i2c client to participate at
> the party, you need to provide different interfaces to the different
> chipsets.

I may have to solve a similar problem when connecting an image sensor
directly to an embedded processor. My current idea looks a bit like
this:

1) The I2C bus is a platform device, created at boot time, independent
of my video capture module.
2) My module contains a dummy I2C driver, which exists solely to grab an
i2c_adapter pointer for the platform I2C device.

My underlying libraries don't have to worry whether the i2c_adapter came
from a parent PCI device or a platform device. My only worry is that
power management may still provide us with a headache, as we'll have to
cope with platform devices being suspended in any order.

- Adrian Cox
Humboldt Solutions Ltd.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/