]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
i2c: uniphier: issue STOP only for last message or I2C_M_STOP
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 31 Aug 2018 14:30:47 +0000 (23:30 +0900)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:52:05 +0000 (19:52 -0600)
commitbb7b3b34cb5263d31ccd8ee7e5aa8235e349e273
treeccfe28a1955f2596364b260db9e519ecec4da9bc
parent6333b13e3666f4e63b771fd97159d3e0dc3c7a41
i2c: uniphier: issue STOP only for last message or I2C_M_STOP

BugLink: https://bugs.launchpad.net/bugs/1836426
[ Upstream commit 38f5d8d8cbb2ffa2b54315118185332329ec891c ]

This driver currently emits a STOP if the next message is not
I2C_MD_RD.  It should not do it because it disturbs the I2C_RDWR
ioctl, where read/write transactions are combined without STOP
between.

Issue STOP only when the message is the last one _or_ flagged with
I2C_M_STOP.

Fixes: dd6fd4a32793 ("i2c: uniphier: add UniPhier FIFO-less I2C driver")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/i2c/busses/i2c-uniphier.c