Commit 4b3dfb0e authored by Wolfram Sang's avatar Wolfram Sang

i2c: gxp: return proper error on address NACK

According to Documentation/i2c/fault-codes.rst, NACK after sending an
address should be -ENXIO.
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 1d092308
......@@ -129,8 +129,10 @@ static int gxp_i2c_master_xfer(struct i2c_adapter *adapter,
if (time_left == 0)
return -ETIMEDOUT;
if (drvdata->state == GXP_I2C_ADDR_NACK ||
drvdata->state == GXP_I2C_DATA_NACK)
if (drvdata->state == GXP_I2C_ADDR_NACK)
return -ENXIO;
if (drvdata->state == GXP_I2C_DATA_NACK)
return -EIO;
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment