Skip to content
Commit 3bf699f7 authored by Alain Volmat's avatar Alain Volmat Committed by Patrick Delaunay
Browse files

i2c: stm32: do not set the STOP condition on error

Current function stm32_i2c_message_xfer is sending a STOP
whatever the result of the transaction is.  This can cause issues
such as making the bus busy since the controller itself is already
sending automatically a STOP when a NACK is generated.

Thanks to Jorge Ramirez-Ortiz for diagnosing and proposing a first
fix for this. [1]

[1] https://lore.kernel.org/u-boot/20220815145211.31342-2-jorge@foundries.io/



Reported-by: default avatarJorge Ramirez-Ortiz, Foundries <jorge@foundries.io>
Signed-off-by: default avatarJorge Ramirez-Ortiz <jorge@foundries.io>
Signed-off-by: default avatarAlain Volmat <alain.volmat@foss.st.com>
Reviewed-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: default avatarHeiko Schocher <hs@denx.de>
Reviewed-by: default avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
Tested-by: default avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
parent bcc75092
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment