[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211130155443.sbvpirzj6moikxl2@core>
Date: Tue, 30 Nov 2021 16:54:43 +0100
From: Ondřej Jirman <megous@...ous.com>
To: Wolfram Sang <wsa@...nel.org>, Heiko Stuebner <heiko@...ech.de>,
Krzysztof Kozlowski <krzk@...nel.org>,
"moderated list:ARM/Rockchip SoC support"
<linux-arm-kernel@...ts.infradead.org>,
"open list:ARM/Rockchip SoC support"
<linux-rockchip@...ts.infradead.org>,
"open list:I2C SUBSYSTEM HOST DRIVERS" <linux-i2c@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [RESEND PATCH] i2c: rk3x: Handle a spurious start completion
interrupt flag
On Mon, Nov 29, 2021 at 10:37:43AM +0100, Wolfram Sang wrote:
>
> > This causes I2C transfer being aborted in polled mode from a stop completion
> > handler:
>
> I wonder why this only happens in polling mode? The question behind that
> is: is it really a spurious irq from the HW or is it maybe a race in the
> driver? Because polling uses the same interrupt handler but just
> periodically polls it.
Spurious interupt happens in both modes.
Abort only happens in polled mode, becase polling executes the irq handler
before the stop condition interrupt fires. In that case rk3x_i2c_irq will
execute rk3x_i2c_handle_stop, which will terminate the transfer, becasuse
it's executed without STOP completion interrupt flag being set.
In interrupt mode, the interrupt handler alwyas executes after the stop
condition, so the spurious START interrupt is ignored in this case.
kind regards,
o.
Powered by blists - more mailing lists