]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
i2c: add helpers to ease DMA handling
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Thu, 25 Apr 2019 04:43:33 +0000 (12:43 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 15 May 2019 12:46:29 +0000 (14:46 +0200)
commit5af5dd085ad9b029c8cdeaf57b317adae0228a0c
treefc8c1f6a39d20085d96746d9e8321882b8d7b197
parent0056ecd05f616e89ea927498929c34f238dcd193
i2c: add helpers to ease DMA handling

BugLink: https://bugs.launchpad.net/bugs/1787775
From: Wolfram Sang <wsa+renesas@sang-engineering.com>

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>
(cherry picked from commit e94bc5d18be03dac8e9d73d30c5523728edeff76)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Kleber Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/i2c/i2c-core-base.c
include/linux/i2c.h