summaryrefslogtreecommitdiff
path: root/include/uapi/linux/i2c.h
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2017-11-04 23:20:01 +0300
committerWolfram Sang <wsa@the-dreams.de>2017-12-03 22:47:33 +0300
commit521a72e1f2e8141d78e7699eaacda24e308ed428 (patch)
tree11ef5aef08fb208c3152812c36ecb5bedfa95dd1 /include/uapi/linux/i2c.h
parent14911c6f48ec9571343ac36ae02f2db68bf9e7f9 (diff)
downloadlinux-521a72e1f2e8141d78e7699eaacda24e308ed428.tar.xz
i2c: add a message flag for DMA safe buffers
I2C has no requirement that the buffer of a message needs to be DMA safe. In case it is, it can now be flagged, so drivers wishing to do DMA can use the buffer directly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'include/uapi/linux/i2c.h')
-rw-r--r--include/uapi/linux/i2c.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/i2c.h b/include/uapi/linux/i2c.h
index fe648032d6b9..f71a1751cacf 100644
--- a/include/uapi/linux/i2c.h
+++ b/include/uapi/linux/i2c.h
@@ -72,6 +72,9 @@ struct i2c_msg {
#define I2C_M_RD 0x0001 /* read data, from slave to master */
/* I2C_M_RD is guaranteed to be 0x0001! */
#define I2C_M_TEN 0x0010 /* this is a ten bit chip address */
+#define I2C_M_DMA_SAFE 0x0200 /* the buffer of this message is DMA safe */
+ /* makes only sense in kernelspace */
+ /* userspace buffers are copied anyway */
#define I2C_M_RECV_LEN 0x0400 /* length will be first received byte */
#define I2C_M_NO_RD_ACK 0x0800 /* if I2C_FUNC_PROTOCOL_MANGLING */
#define I2C_M_IGNORE_NAK 0x1000 /* if I2C_FUNC_PROTOCOL_MANGLING */