Re: [PATCH v2] ucsi_ccg: Refine the UCSI Interrupt handling
From: Greg Kroah-Hartman
Date: Tue Jan 03 2023 - 02:32:16 EST
On Tue, Jan 03, 2023 at 10:40:23AM +0800, Haotien Hsu wrote:
> From: Sing-Han Chen <singhanc@xxxxxxxxxx>
>
> For the CCGx, when the OPM field in the INTR_REG is cleared, then the
> CCI data in the PPM is reset.
>
> To align with the CCGx UCSI interface guide, this patch updates the
> driver to copy CCI and MESSAGE_IN before clearing UCSI interrupt.
> When a new command is sent, the driver will clear the old CCI and
> MESSAGE_IN copy.
>
> Finally, clear UCSI_READ_INT before calling complete() to ensure that
> the ucsi_ccg_sync_write() would wait for the interrupt handling to
> complete.
> It prevents the driver from resetting CCI prematurely.
>
> Signed-off-by: Sing-Han Chen <singhanc@xxxxxxxxxx>
> Signed-off-by: Haotien Hsu <haotienh@xxxxxxxxxx>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
The test robot reported this whole issue? If not, it should not be
here.
thanks,
greg k-h