Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
[pandora-kernel.git] / include / linux / i2c.h
index 78a305b..76014f8 100644 (file)
@@ -140,7 +140,6 @@ struct i2c_driver {
        int (*command)(struct i2c_client *client,unsigned int cmd, void *arg);
 
        struct device_driver driver;
-       struct list_head list;
 };
 #define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)
 
@@ -159,7 +158,7 @@ struct i2c_driver {
  * @irq: indicates the IRQ generated by this device (if any)
  * @driver_name: Identifies new-style driver used with this device; also
  *     used as the module name for hotplug/coldplug modprobe support.
- * @list: list of active/busy clients
+ * @list: list of active/busy clients (DEPRECATED)
  * @released: used to synchronize client releases & detaches and references
  *
  * An i2c_client identifies a single device (i.e. chip) connected to an
@@ -177,11 +176,13 @@ struct i2c_client {
        struct device dev;              /* the device structure         */
        int irq;                        /* irq issued by device (or -1) */
        char driver_name[KOBJ_NAME_LEN];
-       struct list_head list;
+       struct list_head list;          /* DEPRECATED */
        struct completion released;
 };
 #define to_i2c_client(d) container_of(d, struct i2c_client, dev)
 
+extern struct i2c_client *i2c_verify_client(struct device *dev);
+
 static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
 {
        struct device * const dev = container_of(kobj, struct device, kobj);
@@ -258,6 +259,12 @@ i2c_new_probed_device(struct i2c_adapter *adap,
                      struct i2c_board_info *info,
                      unsigned short const *addr_list);
 
+/* For devices that use several addresses, use i2c_new_dummy() to make
+ * client handles for the extra addresses.
+ */
+extern struct i2c_client *
+i2c_new_dummy(struct i2c_adapter *adap, u16 address, const char *type);
+
 extern void i2c_unregister_device(struct i2c_client *);
 
 /* Mainboard arch_initcall() code should register all its I2C devices.
@@ -316,8 +323,7 @@ struct i2c_adapter {
        struct device dev;              /* the adapter device */
 
        int nr;
-       struct list_head clients;
-       struct list_head list;
+       struct list_head clients;       /* DEPRECATED */
        char name[48];
        struct completion dev_released;
 };