Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
[pandora-kernel.git] / include / linux / i2c.h
index 526ddc8..9b5d047 100644 (file)
@@ -64,14 +64,6 @@ extern int i2c_master_recv(struct i2c_client *,char* ,int);
  */
 extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num);
 
-/*
- * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor. 
- * This is not tested/implemented yet and will change in the future.
- */
-extern int i2c_slave_send(struct i2c_client *,char*,int);
-extern int i2c_slave_recv(struct i2c_client *,char*,int);
-
-
 
 /* This is the very generalized SMBus access routine. You probably do not
    want to use this, though; one of the functions below may be much easier,
@@ -193,16 +185,14 @@ struct i2c_algorithm {
           to NULL. If an adapter algorithm can do SMBus access, set 
           smbus_xfer. If set to NULL, the SMBus protocol is simulated
           using common I2C messages */
+       /* master_xfer should return the number of messages successfully
+          processed, or a negative value on error */
        int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, 
                           int num);
        int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, 
                           unsigned short flags, char read_write,
                           u8 command, int size, union i2c_smbus_data * data);
 
-       /* --- these optional/future use for some adapter types.*/
-       int (*slave_send)(struct i2c_adapter *,char*,int);
-       int (*slave_recv)(struct i2c_adapter *,char*,int);
-
        /* --- ioctl like call to set div. parameters. */
        int (*algo_control)(struct i2c_adapter *, unsigned int, unsigned long);
 
@@ -218,7 +208,7 @@ struct i2c_adapter {
        struct module *owner;
        unsigned int id;
        unsigned int class;
-       struct i2c_algorithm *algo;/* the algorithm to access the bus   */
+       const struct i2c_algorithm *algo; /* the algorithm to access the bus */
        void *algo_data;
 
        /* --- administration stuff. */