]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/i2c.h
[PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (7/9)
[linux-2.6-omap-h63xx.git] / include / linux / i2c.h
index be837b13f2978d027156ee7459c8453da6cdee15..39ff363eadec2d245f97e1c3710091ee019fa98d 100644 (file)
 #include <linux/device.h>      /* for struct device */
 #include <asm/semaphore.h>
 
+/* --- For i2c-isa ---------------------------------------------------- */
+
+extern void i2c_adapter_dev_release(struct device *dev);
+extern struct device_driver i2c_adapter_driver;
+extern struct class i2c_adapter_class;
+extern struct bus_type i2c_bus_type;
+
 /* --- General options ------------------------------------------------        */
 
 struct i2c_msg;
@@ -143,12 +150,9 @@ struct i2c_driver {
  */
 struct i2c_client {
        unsigned int flags;             /* div., see below              */
-       unsigned int addr;              /* chip address - NOTE: 7bit    */
+       unsigned short addr;            /* chip address - NOTE: 7bit    */
                                        /* addresses are stored in the  */
-                                       /* _LOWER_ 7 bits of this char  */
-       /* addr: unsigned int to make lm_sensors i2c-isa adapter work
-         more cleanly. It does not take any more memory space, due to
-         alignment considerations */
+                                       /* _LOWER_ 7 bits               */
        struct i2c_adapter *adapter;    /* the adapter we sit on        */
        struct i2c_driver *driver;      /* and our access routines      */
        int usage_count;                /* How many accesses currently  */
@@ -160,6 +164,11 @@ struct i2c_client {
 };
 #define to_i2c_client(d) container_of(d, struct i2c_client, dev)
 
+static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
+{
+       return to_i2c_client(container_of(kobj, struct device, kobj));
+}
+
 static inline void *i2c_get_clientdata (struct i2c_client *dev)
 {
        return dev_get_drvdata (&dev->dev);
@@ -297,7 +306,6 @@ struct i2c_client_address_data {
 
 /* Internal numbers to terminate lists */
 #define I2C_CLIENT_END         0xfffeU
-#define I2C_CLIENT_ISA_END     0xfffefffeU
 
 /* The numbers to use to set I2C bus address */
 #define ANY_I2C_BUS            0xffff