]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: add helpers to ease DMA handling
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 4 Nov 2017 20:20:02 +0000 (21:20 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 3 Dec 2017 19:47:44 +0000 (20:47 +0100)
commitdc008008861e64364e49139560249f3f7c225db8
treeb27ccb2a6eced40136fb73208f3e77cb8809c8e7
parent658f85b4496458d871e948cf1be4b0a4ec27d6b2
i2c: add helpers to ease DMA handling

One helper checks if DMA is suitable and optionally creates a bounce
buffer, if not. The other function returns the bounce buffer and makes
sure the data is properly copied back to the message.

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>
drivers/i2c/i2c-core-base.c
include/linux/i2c.h