Skip to content
Commit d7976753 authored by Mulin Chao's avatar Mulin Chao Committed by Anas Nashif
Browse files

driver: i2c: fix recovery mechanism in npcx series.



Since the PU power rail of i2c bus might be gone at the initial state
after ec powered up, we might have no chance to get STOP condition. This
is because no i2c transactions occurred before its power rail is
restored. But it's crucial to reset the whole i2c module after i2c bus
is back to the idle state.

The original test suite for i2c recovery mechanism didn't consider this
case that initial i2c bus is low before ec powered on. Hence, this CL
fixed this symptom by:

1. Force i2c modules must proceed 'reset' step no matter we received
   STOP condition or not.
2. Use Boolean for condition check to prevent misusage and meet MISRA.

Signed-off-by: default avatarMulin Chao <mlchao@nuvoton.com>
parent cc0f6007
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment