i2c: pxa: avoid complaints with non-responsive slaves
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 11 May 2020 21:10:32 +0000 (22:10 +0100)
committerWolfram Sang <wsa@kernel.org>
Tue, 12 May 2020 10:32:31 +0000 (12:32 +0200)
commitc25e509aef8bc511e245ca441017d00996f09e36
tree4546c71def3fe2da726259f31151d491f4326df9
parent0f03c08892ac3c42d93662c8dec86bf74e5d4c9b
i2c: pxa: avoid complaints with non-responsive slaves

Running i2cdetect on a PXA I2C adapter is very noisy; it complains
whenever a slave fails to respond to the address cycle.  Since it is
normal to probe for slaves in this way, we should not fill the kernel
log.  This is especially true with SFP modules that take a while to
respond on the I2C bus, and probing via the I2C bus is the only way to
detect that they are ready.

Fix this by changing the internal transfer return code from I2C_RETRY
to a new NO_SLAVE code (mapped to -ENXIO, as per the I2C documentation
for this condition, but we still return -EREMOTEIO to the I2C stack to
maintain long established driver behaviour.)

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-pxa.c