i2c: spacemit: remove stop function to avoid bus error
Previously, STOP handling was split into two separate steps: 1) clear TB/STOP/START/ACK bits 2) issue STOP by calling spacemit_i2c_stop() This left a small window where the control register was updated twice, which can confuse the controller. While this race has not been observed with interrupt-driven transfers, it reliably causes bus errors in PIO mode. Inline the STOP sequence into the IRQ handler and ensure that control register bits are updated atomically in a single writel(). Fixes: 5ea55847 ("i2c: spacemit: add support for SpacemiT K1 SoC") Signed-off-by:Troy Mitchell <troy.mitchell@linux.spacemit.com> Reviewed-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Wolfram Sang <wsa+renesas@sang-engineering.com>
Loading
Please sign in to comment