From: Wolfram Sang <wsa@kernel.org>
To: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Cc: gregory.clement@bootlin.com, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] i2c: mv64xxx: Add bus error recovery
Date: Tue, 25 Aug 2020 11:26:13 +0200 [thread overview]
Message-ID: <20200825092613.GJ1861@ninjato> (raw)
In-Reply-To: <20200824225254.1114-1-mark.tomlinson@alliedtelesis.co.nz>
[-- Attachment #1: Type: text/plain, Size: 860 bytes --]
On Tue, Aug 25, 2020 at 10:52:54AM +1200, Mark Tomlinson wrote:
> This adds i2c bus recovery to the mv64xxx driver.
>
> Implement bus recovery to recover from SCL/SDA stuck low.
>
> This uses the generic recovery function, setting the clock/data lines as
> GPIO pins, and sending 9 clocks to try and recover the bus.
>
> Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
> ---
> Changes in v2:
> - use generic GPIO recovery function.
Thank you for doing that! Glad to see the new helper function works for
you as well. The initialization code is all well, but I wonder about the
use of i2c_recover_bus(). Recovery should be tried only if it is
detected that SDA is pulled low when the bus should be free. So, you
shouldn't call i2c_recover_bus() in unconditionally in probe(). Can your
HW detect if SDA is stuck low?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-08-25 9:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 22:52 [PATCH v2] i2c: mv64xxx: Add bus error recovery Mark Tomlinson
2020-08-25 9:26 ` Wolfram Sang [this message]
2020-08-26 22:31 ` Mark Tomlinson
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=20200825092613.GJ1861@ninjato \
--to=wsa@kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.tomlinson@alliedtelesis.co.nz \
/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