[i2c] [PATCH 0/4] i2c: Introduce i2c listeners

Jon Smirl jonsmirl at gmail.com
Wed Jun 4 21:28:54 CEST 2008


On 6/4/08, Jon Smirl <jonsmirl at gmail.com> wrote:
> On 6/4/08, Jean Delvare <khali at linux-fr.org> wrote:
>  > Hi all,
>  >
>  >  This patch set demonstrates a new concept which I would like to add to
>  >  the i2c subsystem. It is named "i2c listeners" and is based on the
>  >  following structure:

Could the existing API be used something like this?

Drivers register with i2c core using standard driver registration.
Class and address ranges are exposed in a structure like PCI IDs. I2C
can make up it's own ID structure equivalent to the PCI IDs one.

When a new adapter/bus is created i2c core gets the event. Core then
scans the registered driver structures looking for class matches. When
a match is encountered it repeatedly calls the driver's probe function
with the addresses from the range. Driver returns true/false on each
probe which triggers creation of the device.

Why do drivers need the bus creation (attach/detach adapter) events?

-- 
Jon Smirl
jonsmirl at gmail.com



More information about the i2c mailing list