OSDN Git Service

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)
commite94bc5d18be03dac8e9d73d30c5523728edeff76
treeb27ccb2a6eced40136fb73208f3e77cb8809c8e7
parent521a72e1f2e8141d78e7699eaacda24e308ed428
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