Skip to content

Commit c7d9f2b

Browse files
GTLin08carlescufi
authored andcommitted
ITE: drivers/i2c: Don't spam NACK error messages
Printing of NACK messages should be set to LOG_DBG to avoid spamming. When we scan whether there is a target device through I2C, if we use LOG_ERR, it will frequently print out NACK messages. So it is set to LOG_DBG in the case of NACK. Signed-off-by: Tim Lin <[email protected]>
1 parent 620bd5d commit c7d9f2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i2c/i2c_ite_it8xxx2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ static int i2c_parsing_return_value(const struct device *dev)
140140
LOG_ERR("I2C ch%d Address:0x%X Transaction time out.",
141141
config->port, data->addr_16bit);
142142
} else {
143-
LOG_ERR("I2C ch%d Address:0x%X Host error bits message:",
143+
LOG_DBG("I2C ch%d Address:0x%X Host error bits message:",
144144
config->port, data->addr_16bit);
145145
/* Host error bits message*/
146146
if (data->err & HOSTA_TMOE) {
147147
LOG_ERR("Time-out error: hardware time-out error.");
148148
}
149149
if (data->err & HOSTA_NACK) {
150-
LOG_ERR("NACK error: device does not response ACK.");
150+
LOG_DBG("NACK error: device does not response ACK.");
151151
}
152152
if (data->err & HOSTA_FAIL) {
153153
LOG_ERR("Fail: a processing transmission is killed.");

0 commit comments

Comments
 (0)