]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit788c0a84ef126b8526f68c360b99c66d51fdb548
tree4546c71def3fe2da726259f31151d491f4326df9
parentdba7d08a447796281cd7b5eff6a97b777344ec64
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