twsi: replace a couple of errno codes with i2c error codes

Reviewed by:	manu
MFC after:	1 week
This commit is contained in:
Andriy Gapon 2020-09-03 07:42:53 +00:00
parent 1f42dc843f
commit d6adffa570

View File

@ -579,7 +579,7 @@ twsi_intr(void *arg)
case TWSI_STATUS_ADDR_R_NACK:
debugf(sc->dev, "No ack received after transmitting the address\n");
sc->transfer = 0;
sc->error = ETIMEDOUT;
sc->error = IIC_ENOACK;
sc->control_val = 0;
wakeup(sc);
break;
@ -660,7 +660,7 @@ twsi_intr(void *arg)
default:
debugf(sc->dev, "status=%x hot handled\n", status);
sc->transfer = 0;
sc->error = ENXIO;
sc->error = IIC_EBUSERR;
sc->control_val = 0;
wakeup(sc);
break;