X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fi2c.h;h=0c3cf0e2fbca9d206fb9414c88d74ec04bc570af;hb=720b94a4e7548e78be55ab8fd3be4686c57dc808;hp=d1c69565d4dc88be6a34ef586ab7706be667d5ed;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/include/linux/i2c.h b/include/linux/i2c.h index d1c69565d..0c3cf0e2f 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -113,6 +113,7 @@ struct i2c_driver { struct module *owner; char name[32]; int id; + unsigned int class; unsigned int flags; /* div., see below */ /* Notifies the driver that a new bus has appeared. This routine @@ -237,7 +238,6 @@ struct i2c_adapter { /* data fields that are valid for all devices */ struct semaphore bus_lock; struct semaphore clist_lock; - unsigned int flags;/* flags specifying div. data */ int timeout; int retries; @@ -286,12 +286,14 @@ static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data) /* Must equal I2C_M_TEN below */ /* i2c adapter classes (bitmask) */ -#define I2C_ADAP_CLASS_SMBUS (1<<0) /* lm_sensors, ... */ -#define I2C_ADAP_CLASS_TV_ANALOG (1<<1) /* bttv + friends */ -#define I2C_ADAP_CLASS_TV_DIGITAL (1<<2) /* dbv cards */ -#define I2C_ADAP_CLASS_DDC (1<<3) /* i2c-matroxfb ? */ -#define I2C_ADAP_CLASS_CAM_ANALOG (1<<4) /* camera with analog CCD */ -#define I2C_ADAP_CLASS_CAM_DIGITAL (1<<5) /* most webcams */ +#define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */ +#define I2C_CLASS_TV_ANALOG (1<<1) /* bttv + friends */ +#define I2C_CLASS_TV_DIGITAL (1<<2) /* dvb cards */ +#define I2C_CLASS_DDC (1<<3) /* i2c-matroxfb ? */ +#define I2C_CLASS_CAM_ANALOG (1<<4) /* camera with analog CCD */ +#define I2C_CLASS_CAM_DIGITAL (1<<5) /* most webcams */ +#define I2C_CLASS_SOUND (1<<6) /* sound devices */ +#define I2C_CLASS_ALL (UINT_MAX) /* all of the above */ /* i2c_client_address_data is the struct for holding default client * addresses for a driver and for the parameters supplied on the @@ -599,11 +601,4 @@ union i2c_smbus_data { #define i2c_is_isa_adapter(adapptr) \ ((adapptr)->algo->id == I2C_ALGO_ISA) -/* Tiny delay function used by the i2c bus drivers */ -static inline void i2c_delay(signed long timeout) -{ - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(timeout); -} - #endif /* _LINUX_I2C_H */