i2c: brcmstb: Fix START and STOP conditions
commitde5862335ed7c465b0900774fbd869bf91a23c58
authorJaedon Shin <jaedon.shin@gmail.com>
Fri, 3 Mar 2017 01:55:03 +0000 (3 10:55 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:40:30 +0000 (5 14:40 +0200)
treed53a0ef72c80a52dcf3c391c17df4d6e9de0aa12
parent8ee785016d5a05afa9ddd872ae7befa11798bfbf
i2c: brcmstb: Fix START and STOP conditions

commit 2de3ec4f1d4ba6ee380478055104eb918bd50cce upstream.

The BSC data buffers to send and receive data are each of size 32 bytes
or 8 bytes 'xfersz' depending on SoC. The problem observed for all the
combined message transfer was if length of data transfer was a multiple
of 'xfersz' a repeated START was being transmitted by BSC driver. Fixed
this by appropriately setting START/STOP conditions for such transfers.

Fixes: dd1aa2524bc5 ("i2c: brcmstb: Add Broadcom settop SoC i2c controller driver")
Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Acked-by: Kamal Dasu <kdasu.kdev@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-brcmstb.c