Re: [PATCH] i2c: synquacer: fix synquacer_i2c_doxfer() return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Masahisa,

> > I just noticed you have an open coded loop in synquacer_i2c_xfer() which
> > should not be needed because the I2C core does that?
> 
> I'm not sure I correctly understand the meaning of "open coded loop",

It means the driver has the same loop which is already present in the
I2C core.

> > Your code does a HW
> > reset, though, but is it really needed for a lost arbitration?
> 
> Other than handling lost arbitration, this loop also handles following errors.
>  - transfer fails(expected size and actual transferred size is not matched)
>  - transfer timeout
> I think it is reasonable to reset the I2C controller before xfer() retries.

Resetting may be OK, but retrying is not correct. Retrying is only for
lost arbitration. For the above errors, we return the error without
retrying and let the upper layers decide what to do.

Kind regards,

   Wolfram

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux