mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
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: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
1d092308ce
commit
4b3dfb0ed6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user