[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YaaZjVGtmA5NQVwh@kunai>
Date: Tue, 30 Nov 2021 22:37:17 +0100
From: Wolfram Sang <wsa@...nel.org>
To: Ondrej Jirman <megous@...ous.com>
Cc: 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 Fri, Sep 24, 2021 at 01:15:27PM +0200, Ondrej Jirman wrote:
> In a typical read transfer, start completion flag is being set after
> read finishes (notice ipd bit 4 being set):
>
> trasnfer poll=0
> i2c start
> rk3x-i2c fdd40000.i2c: IRQ: state 1, ipd: 10
> i2c read
> rk3x-i2c fdd40000.i2c: IRQ: state 2, ipd: 1b
> i2c stop
> rk3x-i2c fdd40000.i2c: IRQ: state 4, ipd: 33
>
> This causes I2C transfer being aborted in polled mode from a stop completion
> handler:
>
> trasnfer poll=1
> i2c start
> rk3x-i2c fdd40000.i2c: IRQ: state 1, ipd: 10
> i2c read
> rk3x-i2c fdd40000.i2c: IRQ: state 2, ipd: 0
> rk3x-i2c fdd40000.i2c: IRQ: state 2, ipd: 1b
> i2c stop
> rk3x-i2c fdd40000.i2c: IRQ: state 4, ipd: 13
> i2c stop
> rk3x-i2c fdd40000.i2c: unexpected irq in STOP: 0x10
>
> Clearing the START flag after read fixes the issue without any obvious
> side effects.
>
> This issue was dicovered on RK3566 when adding support for powering
> off the RK817 PMIC.
>
> Signed-off-by: Ondrej Jirman <megous@...ous.com>
Applied to for-current, thanks!
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists