OSDN Git Service

i2c: uniphier-f: issue STOP only for last message or I2C_M_STOP
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 31 Aug 2018 14:30:48 +0000 (23:30 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:52:11 +0000 (08:52 +0200)
commit293c9b05879be53b17f80985123d93537264a875
treea10b76614a5d21e784bfe68b1cf9cb92a25430b4
parent3a20876cd27dc80c3aec27e161e3cfb20ca57d74
i2c: uniphier-f: issue STOP only for last message or I2C_M_STOP

[ Upstream commit 4c85609b08c4761eca0a40fd7beb06bc650f252d ]

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: 6a62974b667f ("i2c: uniphier_f: add UniPhier FIFO-builtin 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>
drivers/i2c/busses/i2c-uniphier-f.c