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