I2C NACK error messages

Whenever I read from ADC3, I get a couple of messages about I2C on the console (and in my syslog):

[  472.753752] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx:2) mode:FIFO slv_addr:0x3a MSTR_STS:0x0c1300c8 OPER:0x00000090
[  472.768678] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx:2) mode:FIFO slv_addr:0x3a MSTR_STS:0x0c1300c8 OPER:0x00000090

The messages seem to be harmless (I hope so anyway!), but they’re annoying. Is there a simple way to disable all of these i2c NACK messages from showing up in logread and the console without patching the driver and recompiling the kernel? I can disable them on the console by changing the console debug level in /proc/sys/kernel/printk, but they still fill up the syslog and I don’t necessarily want to ignore all errors.

I agree that those messages are annoying. This is my understanding of the issue:
The WP modules integrate a microcontroller that is used for power control and a few other things including a couple of the ADC pins. The MCU is an I2C slave to the main processor running Linux. The MCU tries to aggressively go into a sleep mode (I think I recall being told after 500 ms). Once the MCU is asleep, it can be woken up by accessing it on the I2C bus. The problem is that it can’t wakeup and respond to the first I2C transaction. So every time the MCU is asleep, the first transaction fails and is then retried. You could dig into the I2C master driver and comment out that log message, but then legitimate failures wouldn’t be reported either.

1 Like

Thanks @dfrey for the detailed explanation about what’s going on – that helps. I think what I’ll end up doing is editing the I2C master driver to inhibit NACK error printouts of that particular slave address (0x3a).