i2c: stm32f7: fix first byte to send in slave mode
authorFabrice Gasnier <fabrice.gasnier@st.com>
Mon, 30 Sep 2019 15:28:01 +0000 (17:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Nov 2019 10:27:32 +0000 (11:27 +0100)
commitd746ce649556795b09d721d34821d38c68400921
treec557152aaaeff978e72adf51aed515e2a13b1773
parent18e7fae372a10334d34c7ad7a28060a14c10f17e
i2c: stm32f7: fix first byte to send in slave mode

[ Upstream commit 02e64276c6dbcc4c5f39844f33d18180832a58f3 ]

The slave-interface documentation [1] states "the bus driver should
transmit the first byte" upon I2C_SLAVE_READ_REQUESTED slave event:
- 'val': backend returns first byte to be sent
The driver currently ignores the 1st byte to send on this event.

[1] https://www.kernel.org/doc/Documentation/i2c/slave-interface

Fixes: 60d609f30de2 ("i2c: i2c-stm32f7: Add slave support")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-stm32f7.c