Re: [RFC][2.6] Additional i2c adapter flags for i2c client isolation

From: Greg KH
Date: Tue Mar 16 2004 - 16:41:17 EST


On Tue, Mar 16, 2004 at 08:14:26PM +0100, Jean Delvare wrote:
>
> I guess that chip drivers would be allowed to define only one class
> while adapters could possibly define more than one?

Not necessarily. Just make the class a bit field, showing what kind of
devices each expects to handle.

> We also would want to introduce an I2C_ADAP_CLASS_ANY define, which
> would be what the eeprom driver would use, for example (since it can be
> hosted on any kind of bus). Generic bus drivers such as i2c-parport
> would also use I2C_ADAP_CLASS_ANY, since the nature of the hosted chips
> is unknown.

Sure:
#define I2C_ADAP_CLASS_ANY 0xffffffff
works for me :)

> Having clients define a class sounds also interesting from a
> user-space's point of view. If we would export this information through
> sysfs for example, programs such as "sensors" could limit their work to
> chips of the correct class (I2C_ADAP_CLASS_SMBUS at the moment, but a
> renaming is planned).

That also is a good idea.

thanks,

greg k-h
-
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/