i2c: npcm: fix consecutive dm_i2c_read/write error
authorStanley Chu <yschu@nuvoton.com>
Thu, 7 Aug 2025 05:32:20 +0000 (13:32 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 18 Aug 2025 22:40:23 +0000 (16:40 -0600)
commit3c632fc090dab1838cedb525e09d049a903c37a6
treeb6a40b8c48cc571f03fc00697876490818bcda6c
parentad3a33e57742bab08a8ca1a9e34c262b6fbf0268
i2c: npcm: fix consecutive dm_i2c_read/write error

When doing a dm_i2c_read followed by a dm_i2c_write, the subsequent
transaction may get npcm_i2c_check_sda error because the module is
still busy in STOP condition in previous dm_i2c_read.
Always check and wait for module to be out of busy before starting
an i2c transaction.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
drivers/i2c/npcm_i2c.c