On 6/4/08, Jon Smirl <[EMAIL PROTECTED]> wrote: > On 6/4/08, Jean Delvare <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] _______________________________________________ i2c mailing list i2c@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/i2c