From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Esben Haabendal <esben@geanix.com>
Cc: linux-i2c@vger.kernel.org,
Gregor Herburger <gregor.herburger@ew.tq-group.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Andi Shyti <andi.shyti@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
linux-kernel@vger.kernel.org, Jinjie Ruan <ruanjinjie@huawei.com>,
Alexander Stein <alexander.stein@ew.tq-group.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] i2c: imx: move to generic GPIO recovery
Date: Fri, 26 Jan 2024 07:07:19 +0100 [thread overview]
Message-ID: <20240126060719.GD381737@pengutronix.de> (raw)
In-Reply-To: <01abf8ccc0af74b4fb0124977ed6bdfb9d7107b6.1706190706.git.esben@geanix.com>
Hi,
On Thu, Jan 25, 2024 at 02:56:36PM +0100, Esben Haabendal wrote:
> Starting with
> commit 75820314de26 ("i2c: core: add generic I2C GPIO recovery")
> GPIO bus recovery is supported by the I2C core, so we can remove the
> driver implementation and use that one instead.
>
> As a nice side-effect, pinctrl becomes optional, allowing bus recovery on
> LS1021A, which does not have such luxury, but can be wired up to use extra
> fixed GPIO pins.
>
> Note: The previous error messages about bus recovery not being supported is
> dropped with this change. Given that it is perfectly possible to have platforms
> where bus recovery works without pinctrl support, I happen to work on one such,
> both error messages does not really make sense in those cases. And I don't see
> how to know if this is the case or not.
>
> Signed-off-by: Esben Haabendal <esben@geanix.com>
Thank you for your work.
> ---
....
> + struct i2c_bus_recovery_info *bri = &i2c_imx->rinfo;
>
> - dev_dbg(&pdev->dev, "using scl%s for recovery\n",
> - rinfo->sda_gpiod ? ",sda" : "");
> + bri->pinctrl = devm_pinctrl_get(&pdev->dev);
> + if (IS_ERR(bri->pinctrl))
> + return PTR_ERR(bri->pinctrl);
According to the commit message - "pinctrl becomes optional", but this
code stops probe if pinctrl will fail for one or another reason. I do
not see any place returning NULL on fail. Do I'm missing something?
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-01-26 6:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 13:56 [PATCH] i2c: imx: move to generic GPIO recovery Esben Haabendal
2024-01-26 6:07 ` Oleksij Rempel [this message]
2024-01-26 7:38 ` Esben Haabendal
2024-01-26 7:43 ` Oleksij Rempel
2024-01-31 0:18 ` Andi Shyti
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=20240126060719.GD381737@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=alexander.stein@ew.tq-group.com \
--cc=andi.shyti@kernel.org \
--cc=esben@geanix.com \
--cc=festevam@gmail.com \
--cc=gregor.herburger@ew.tq-group.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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