projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0adf76
)
i2c: xlp9xx: return ENXIO on slave address NACK
author
Dmitry Bazhenov
<
[email protected]
>
Thu, 18 Jan 2018 05:39:21 +0000
(
05:39
+0000)
committer
Wolfram Sang
<
[email protected]
>
Mon, 26 Feb 2018 20:14:09 +0000
(21:14 +0100)
Fix the driver violation of the common practice to return
ENXIO error on a slave address NACK.
Signed-off-by: Dmitry Bazhenov <
[email protected]
>
Signed-off-by: George Cherian <
[email protected]
>
Tested-by: dann frazier <
[email protected]
>
Signed-off-by: Wolfram Sang <
[email protected]
>
drivers/i2c/busses/i2c-xlp9xx.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/busses/i2c-xlp9xx.c
b/drivers/i2c/busses/i2c-xlp9xx.c
index b970bf8f38e57f0ac3b072620bb96de15796b744..6d78cdc5cf91abd2bb785fb13e46581b1515574e 100644
(file)
--- a/
drivers/i2c/busses/i2c-xlp9xx.c
+++ b/
drivers/i2c/busses/i2c-xlp9xx.c
@@
-324,7
+324,8
@@
static int xlp9xx_i2c_xfer_msg(struct xlp9xx_i2c_dev *priv, struct i2c_msg *msg,
dev_dbg(priv->dev, "transfer error %x!\n", priv->msg_err);
if (priv->msg_err & XLP9XX_I2C_INTEN_BUSERR)
xlp9xx_i2c_init(priv);
- return -EIO;
+ return (priv->msg_err & XLP9XX_I2C_INTEN_NACKADDR) ?
+ -ENXIO : -EIO;
}
if (timeleft == 0) {