summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGerd Knorr <kraxel@bytesex.org>2003-05-06 03:16:36 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2003-05-06 03:16:36 -0700
commitea1b28a4d66b08082242670e717d92b86b52b46d (patch)
tree90848a68130552a90c6033007e45057e57defed5 /include/linux
parent37d7f421ce2d3ff357ecbed85d20e62bd2e7afcf (diff)
[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 ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c.h7
1 files changed, 7 insertions, 0 deletions
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