Re: [PATCH] i2c: microchip-core: fix erroneous late ack send

From: Wolfram Sang
Date: Thu Aug 11 2022 - 08:28:59 EST


On Fri, Aug 05, 2022 at 08:43:46AM +0100, Conor Dooley wrote:
> A late ack is currently being sent at the end of a transfer due to
> incorrect logic in mchp_corei2c_empty_rx(). Currently the Assert Ack
> bit is being written to the controller's control reg after the last
> byte has been received, causing it to sent another byte with the ack.
> Instead, the AA flag should be written to to the contol register when
> the penultimate byte is read so it is sent out for the last byte.
>
> Reported-by: Andreas Buerkler <andreas.buerkler@xxxxxxxxxxxxx>
> Fixes: 64a6f1c4987e ("i2c: add support for microchip fpga i2c controllers")
> Tested-by: Lewis Hanly <lewis.hanly@xxxxxxxxxxxxx>
> Signed-off-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>

Fixed these checkpatch warnings:

WARNING: 'contol' may be misspelled - perhaps 'control'?
WARNING: Possible repeated word: 'to'

and applied to for-current, thanks!

Attachment: signature.asc
Description: PGP signature