From: Wolfram Sang <wsa@kernel.org>
To: Ondrej Jirman <megous@megous.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
Krzysztof Kozlowski <krzk@kernel.org>,
"moderated list:ARM/Rockchip SoC support"
<linux-arm-kernel@lists.infradead.org>,
"open list:ARM/Rockchip SoC support"
<linux-rockchip@lists.infradead.org>,
"open list:I2C SUBSYSTEM HOST DRIVERS"
<linux-i2c@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND PATCH] i2c: rk3x: Handle a spurious start completion interrupt flag
Date: Tue, 30 Nov 2021 22:37:17 +0100 [thread overview]
Message-ID: <YaaZjVGtmA5NQVwh@kunai> (raw)
In-Reply-To: <20210924111528.2924251-1-megous@megous.com>
[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]
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@megous.com>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2021-11-30 21:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-24 11:15 [RESEND PATCH] i2c: rk3x: Handle a spurious start completion interrupt flag Ondrej Jirman
2021-11-18 18:37 ` John Keeping
2021-11-29 9:37 ` Wolfram Sang
2021-11-30 15:54 ` Ondřej Jirman
2021-11-30 21:36 ` Wolfram Sang
2021-11-30 21:37 ` Wolfram Sang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YaaZjVGtmA5NQVwh@kunai \
--to=wsa@kernel.org \
--cc=heiko@sntech.de \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=megous@megous.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).