diff options
author | Gregor Herburger <[email protected]> | 2023-04-13 11:37:37 +0200 |
---|---|---|
committer | Wolfram Sang <[email protected]> | 2023-04-13 18:29:29 +0200 |
commit | f8160d3b35fc94491bb0cb974dbda310ef96c0e2 (patch) | |
tree | 2123ccccdd50add3c003250ff62100d8a25ebc08 /scripts/gdb/linux/config.py | |
parent | aa874cdfec07d4dd9c6f0c356d65c609ba31a26f (diff) |
i2c: ocores: generate stop condition after timeout in polling mode
In polling mode, no stop condition is generated after a timeout. This
causes SCL to remain low and thereby block the bus. If this happens
during a transfer it can cause slaves to misinterpret the subsequent
transfer and return wrong values.
To solve this, pass the ETIMEDOUT error up from ocores_process_polling()
instead of setting STATE_ERROR directly. The caller is adjusted to call
ocores_process_timeout() on error both in polling and in IRQ mode, which
will set STATE_ERROR and generate a stop condition.
Fixes: 69c8c0c0efa8 ("i2c: ocores: add polling interface")
Signed-off-by: Gregor Herburger <[email protected]>
Signed-off-by: Matthias Schiffer <[email protected]>
Acked-by: Peter Korsgaard <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Reviewed-by: Federico Vaga <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/config.py')
0 files changed, 0 insertions, 0 deletions