From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Yann Sionneau <yann@sionneau.net>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
Yann Sionneau <ysionneau@kalray.eu>
Subject: Re: [PATCH] i2c: designware: add support for pinctrl for recovery
Date: Fri, 11 Aug 2023 17:36:44 +0300 [thread overview]
Message-ID: <ZNZHfPCMg1Js28iF@smile.fi.intel.com> (raw)
In-Reply-To: <20230811135201.23046-1-yann@sionneau.net>
On Fri, Aug 11, 2023 at 03:52:01PM +0200, Yann Sionneau wrote:
> From: Yann Sionneau <ysionneau@kalray.eu>
>
> Currently if the SoC needs pinctrl to switch the scl and sda
SCL
SDA
> from hw function to gpio function, the recovery won't work.
from the I2C
GPIO
> scl-gpio = <>;
> sda-gpio = <>;
>
> Are not enough for some SoCs to have a working recovery.
> Some need:
>
> scl-gpio = <>;
> sda-gpio = <>;
> pinctrl-names = "default", "recovery";
> pinctrl-0 = <&i2c_pins_hw>;
> pinctrl-1 = <&i2c_pins_gpio>;
>
> The driver was not filling rinfo->pinctrl with the device node
> pinctrl data which is needed by generic recovery code.
...
> #include <linux/pm_runtime.h>
> #include <linux/regmap.h>
> #include <linux/reset.h>
> +#include <linux/pinctrl/consumer.h>
Keep this in order.
...
> + rinfo->pinctrl = devm_pinctrl_get(dev->dev);
> + if (!rinfo->pinctrl || IS_ERR(rinfo->pinctrl)) {
It's not possible to have it NULL, why a dead code?
> + rinfo->pinctrl = NULL;
> + dev_info(dev->dev, "can't get pinctrl, bus recovery might not work\n");
> + }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-08-11 14:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 13:52 [PATCH] i2c: designware: add support for pinctrl for recovery Yann Sionneau
2023-08-11 14:36 ` Andy Shevchenko [this message]
2023-08-16 9:46 ` Yann Sionneau
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=ZNZHfPCMg1Js28iF@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=yann@sionneau.net \
--cc=ysionneau@kalray.eu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.