From: Andi Shyti <andi.shyti@kernel.org>
To: Anand Moon <linux.amoon@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
"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>,
David Wu <david.wu@rock-chips.com>
Subject: Re: [PATCH v2] i2c: rk3x: add support for SCL OE debounce and slave hold recovery
Date: Fri, 27 Mar 2026 15:13:04 +0100 [thread overview]
Message-ID: <acaO5ouMmGA8-tqJ@zenone.zhora.eu> (raw)
In-Reply-To: <20260321105146.7419-1-linux.amoon@gmail.com>
Hi Anand,
...
> @@ -1125,6 +1141,17 @@ static int rk3x_i2c_xfer_common(struct i2c_adapter *adap,
> }
> }
>
> + /*
> + * If a timeout occurred and the slave is holding SCL,
> + * re-apply the timings/dividers to attempt recovery.
> + */
> + if (ret == -ETIMEDOUT && i2c->soc_data->has_scl_oe_debounce) {
> + if (ipd & REG_INT_SLV_HDSCL) {
> + dev_err(i2c->dev, "SCL hold by slave detected, resetting timings.\n");
> + rk3x_i2c_adapt_div(i2c, clk_get_rate(i2c->clk));
argh! this nests i2c->lock. rk3x_i2c_xfer_common() already holds
it when calling rk3x_i2c_adapt_div().
Andi
> + }
> + }
> +
next prev parent reply other threads:[~2026-03-27 14:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 10:51 Anand Moon
2026-03-27 14:13 ` Andi Shyti [this message]
2026-03-31 13:18 ` Anand Moon
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=acaO5ouMmGA8-tqJ@zenone.zhora.eu \
--to=andi.shyti@kernel.org \
--cc=david.wu@rock-chips.com \
--cc=heiko@sntech.de \
--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=linux.amoon@gmail.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
all inboxes | Powered by JetHome®