driver: i2c: npcx: don't print the err log when SMBST is zero
In the I2C ISR, it prints the error message when SMBST is set to an unexpected value. However, we found a spurious interrupt which caused the SoC to enter the ISR with SMBST=0. Because the spurious interrupt will not break the I2C operation, this commit limits the error log to print if SMBST is not equivalent to 0 to prevent a false alert. Signed-off-by: Andrew McRae <amcrae@google.com> Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
This commit is contained in:
parent
604f705fda
commit
0bbf394ced
1 changed files with 5 additions and 3 deletions
|
@ -739,9 +739,11 @@ static void i2c_ctrl_isr(const struct device *dev)
|
|||
}
|
||||
|
||||
/* Clear unexpected status bits */
|
||||
inst_fifo->SMBST = status;
|
||||
LOG_ERR("Unexpected SMBST 0x%02x occurred on i2c port%02x!", status,
|
||||
data->port);
|
||||
if (status != 0) {
|
||||
inst_fifo->SMBST = status;
|
||||
LOG_ERR("Unexpected SMBST 0x%02x occurred on i2c port%02x!",
|
||||
status, data->port);
|
||||
}
|
||||
}
|
||||
|
||||
/* NPCX specific I2C controller functions */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue