Skip to content

Commit 7b88e17

Browse files
authored
Merge pull request zephyrproject-rtos#11 from FrameworkComputer/lotus.do_not_recovery_i2c_bus
Lotus: don't recovery the i2c bus when the bus is idle
2 parents 29ee081 + 77e4a3f commit 7b88e17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/i2c/i2c_npcx_controller.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,8 @@ static void i2c_ctrl_isr(const struct device *dev)
914914
tmp = i2c_ctrl_fifo_read(dev);
915915

916916
LOG_ERR("Bus error occurred on i2c port%02x!", data->port);
917-
data->oper_state = NPCX_I2C_ERROR_RECOVERY;
917+
if (data->oper_state != NPCX_I2C_IDLE)
918+
data->oper_state = NPCX_I2C_ERROR_RECOVERY;
918919

919920
/* I/O error occurred */
920921
i2c_ctrl_notify(dev, -EIO);

0 commit comments

Comments
 (0)