RE: [PATCH V2 2/2] drivers: i2c: qup: Fix error handling

From: Sricharan
Date: Mon May 16 2016 - 01:59:49 EST


Hi,
> > > Among the bus errors reported from the QUP_MASTER_STATUS register
> > > only NACK is considered and transfer gets suspended, while other
> > > errors are ignored. Correct this and suspend the transfer for other
> > > errors as well. This avoids unnessecary 'timeouts' which happens
> > > when waiting for events that would never happen when there is
> > > already an error condition on the bus.
> > >
> > > Signed-off-by: Sricharan R <sricharan@xxxxxxxxxxxxxx>
> > > Reviewed-by: Andy Gross <andy.gross@xxxxxxxxxx>
> >
> > Please check Documentation/i2c/fault-codes for proper fault codes.
>
Ok, Thanks for pointing this out. So, for NACK I think it is more
appropriate to
return -ENXIO and -EIO for other errors. Will correct this.

> And while we are here: NACK is not an error but a valid response. Can you
> remove the dev_err related to that? Otherwise tools like i2cdetect will
> probably flood your log.
Ok, will correct this.

Regards,
Sricharan