Skip to content

Commit 7c42467

Browse files
Jan GlauberWolfram Sang
authored andcommitted
i2c: octeon: Prevent error message on bus error
The error message: [Fri Feb 16 13:42:13 2018] i2c-thunderx 0000:01:09.4: unhandled state: 0 is mis-leading as state 0 (bus error) is not an unknown state. Return -EIO as before but avoid printing the message. Also rename STAT_ERROR to STATE_BUS_ERROR. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 1a0e3a3 commit 7c42467

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

drivers/i2c/busses/i2c-octeon-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ static int octeon_i2c_check_status(struct octeon_i2c *i2c, int final_read)
233233
return -EOPNOTSUPP;
234234

235235
case STAT_TXDATA_NAK:
236+
case STAT_BUS_ERROR:
236237
return -EIO;
237238
case STAT_TXADDR_NAK:
238239
case STAT_RXADDR_NAK:

drivers/i2c/busses/i2c-octeon-core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#define TWSI_CTL_AAK 0x04 /* Assert ACK */
4444

4545
/* Status values */
46-
#define STAT_ERROR 0x00
46+
#define STAT_BUS_ERROR 0x00
4747
#define STAT_START 0x08
4848
#define STAT_REP_START 0x10
4949
#define STAT_TXADDR_ACK 0x18

0 commit comments

Comments
 (0)