From ea1b28a4d66b08082242670e717d92b86b52b46d Mon Sep 17 00:00:00 2001 From: Gerd Knorr Date: Tue, 6 May 2003 03:16:36 -0700 Subject: [PATCH] i2c #3/3: add class field to i2c_adapter This is the last of three patches for i2c. It introduces a new field to i2c_adapter which classifies the kind of hardware a i2c adapter belongs to (analog tv card / dvb card / smbus / gfx card ...). i2c chip drivers can use this infomation to decide whenever they want to look for hardware on that adapter or not. It doesn't make sense to probe for a tv tuner on a smbus for example ... --- include/linux/i2c.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux') diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 15c94caeba74..6876a6705bb8 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -225,6 +225,7 @@ struct i2c_adapter { struct module *owner; unsigned int id;/* == is algo->id | hwdep.struct->id, */ /* for registered values see below */ + unsigned int class; struct i2c_algorithm *algo;/* the algorithm to access the bus */ void *algo_data; @@ -278,6 +279,12 @@ static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data) #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ /* 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_DIGINAL (1<<2) /* dbv cards */ +#define I2C_ADAP_CLASS_DDC (1<<3) /* i2c-matroxfb ? */ + /* i2c_client_address_data is the struct for holding default client * addresses for a driver and for the parameters supplied on the * command line -- cgit v1.2.3