Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1736018
| From | Wolfram Sang <wsa+renesas@sang-engineering.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH v5 1/6] i2c: add a message flag for DMA safe buffers |
| Date | 2017-09-20 21:10 +0200 |
| Message-ID | <urSxI-79x-27@gated-at.bofh.it> (permalink) |
| References | <urSxH-79x-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
include/uapi/linux/i2c.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/uapi/linux/i2c.h b/include/uapi/linux/i2c.h
index 009e27bb9abe19..1c683cb319e4b7 100644
--- a/include/uapi/linux/i2c.h
+++ b/include/uapi/linux/i2c.h
@@ -71,6 +71,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 */
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH v5 0/6] i2c: document DMA handling and add helpers for it Wolfram Sang <wsa+renesas@sang-engineering.com> - 2017-09-20 21:10 +0200
[RFC PATCH v5 4/6] i2c: sh_mobile: use helper to decide if DMA is useful Wolfram Sang <wsa+renesas@sang-engineering.com> - 2017-09-20 21:10 +0200
[RFC PATCH v5 2/6] i2c: add helpers to ease DMA handling Wolfram Sang <wsa+renesas@sang-engineering.com> - 2017-09-20 21:10 +0200
Re: [RFC PATCH v5 2/6] i2c: add helpers to ease DMA handling Jonathan Cameron <Jonathan.Cameron@huawei.com> - 2017-09-21 16:10 +0200
Re: [RFC PATCH v5 2/6] i2c: add helpers to ease DMA handling Jonathan Cameron <Jonathan.Cameron@huawei.com> - 2017-09-21 16:10 +0200
Re: [RFC PATCH v5 2/6] i2c: add helpers to ease DMA handling Wolfram Sang <wsa@the-dreams.de> - 2017-09-21 16:20 +0200
Re: [RFC PATCH v5 2/6] i2c: add helpers to ease DMA handling Jonathan Cameron <Jonathan.Cameron@huawei.com> - 2017-09-21 16:40 +0200
[RFC PATCH v5 5/6] i2c: rcar: skip DMA if buffer is not safe Wolfram Sang <wsa+renesas@sang-engineering.com> - 2017-09-20 21:10 +0200
[RFC PATCH v5 1/6] i2c: add a message flag for DMA safe buffers Wolfram Sang <wsa+renesas@sang-engineering.com> - 2017-09-20 21:10 +0200
[RFC PATCH v5 3/6] i2c: add docs to clarify DMA handling Wolfram Sang <wsa+renesas@sang-engineering.com> - 2017-09-20 21:10 +0200
Re: [RFC PATCH v5 3/6] i2c: add docs to clarify DMA handling Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-09-20 22:00 +0200
Re: [RFC PATCH v5 3/6] i2c: add docs to clarify DMA handling Jonathan Cameron <Jonathan.Cameron@huawei.com> - 2017-09-21 16:10 +0200
csiph-web