summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2014-01-26 16:05:36 +0000
committerWolfram Sang <wsa@the-dreams.de>2014-01-26 22:48:35 +0100
commit25ee33fb824eb46ae77f6c962007492603d39772 (patch)
tree9dd4df79c15aaf3e6042d131899464b49cd54b79 /include
parentbc8120f17ae87da0850b4e6a806ad88ffd01ca64 (diff)
i2c: update i2c_algorithm documentation
Add some kerneldoc style documentaton to the i2c_algorithm structure, and point the master_xfer return codes at the right place in Documentation/i2c/fault_codes Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index d9c8dbd3373..deddeb8c337 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -342,11 +342,25 @@ i2c_register_board_info(int busnum, struct i2c_board_info const *info,
}
#endif /* I2C_BOARDINFO */
-/*
+/**
+ * struct i2c_algorithm - represent I2C transfer method
+ * @master_xfer: Issue a set of i2c transactions to the given I2C adapter
+ * defined by the msgs array, with num messages available to transfer via
+ * the adapter specified by adap.
+ * @smbus_xfer: Issue smbus transactions to the given I2C adapter. If this
+ * is not present, then the bus layer will try and convert the SMBus calls
+ * into I2C transfers instead.
+ * @functionality: Return the flags that this algorithm/adapter pair supports
+ * from the I2C_FUNC_* flags.
+ *
* The following structs are for those who like to implement new bus drivers:
* i2c_algorithm is the interface to a class of hardware solutions which can
* be addressed using the same bus algorithms - i.e. bit-banging or the PCF8584
* to name two of the most common.
+ *
+ * The return codes from the @master_xfer field should indicate the type of
+ * error code that occured during the transfer, as documented in the kernel
+ * Documentation file Documentation/i2c/fault-codes.
*/
struct i2c_algorithm {
/* If an adapter algorithm can't do I2C-level access, set master_xfer