From: "Hawa, Hanna" <hhhawa@amazon.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: <jarkko.nikula@linux.intel.com>,
<mika.westerberg@linux.intel.com>, <jsd@semihalf.com>,
<linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<dwmw@amazon.co.uk>, <benh@amazon.com>, <ronenk@amazon.com>,
<talel@amazon.com>, <jonnyc@amazon.com>, <hanochu@amazon.com>,
<farbere@amazon.com>, <itamark@amazon.com>
Subject: Re: [PATCH 1/1] i2c: designware: add pinctrl for recovery info as an option
Date: Wed, 14 Dec 2022 15:43:28 +0200 [thread overview]
Message-ID: <806e1787-1f6d-7551-52fd-2e1e25aebaef@amazon.com> (raw)
In-Reply-To: <Y5m2nux5Q1npXAo+@smile.fi.intel.com>
On 12/14/2022 1:42 PM, Andy Shevchenko wrote:
> Can you explain, why pinctrl_bind_pins() is not enough?
>
> (You may also refer to the ab78029ecc34 ("drivers/pinctrl: grab default handles
> from device core") for more details.)
Thanks for your reviewing and pointing to this function.
No need to recall the devm_pinctrl_get() during the i2c probe, as the
pinctrl_bind_pins() is enough to init the pinctrl struct. But still need
to set the rinfo->pinctrl with dev->pins->p, will upload new patchset.
The change will look like:
@@ -832,6 +833,9 @@ static int i2c_dw_init_recovery_info(struct
dw_i2c_dev *dev)
struct i2c_adapter *adap = &dev->adapter;
struct gpio_desc *gpio;
+ if (dev->dev->pins && dev->dev->pins->p)
+ rinfo->pinctrl = dev->dev->pins->p;
+
gpio = devm_gpiod_get_optional(dev->dev, "scl", GPIOD_OUT_HIGH);
if (IS_ERR_OR_NULL(gpio))
return PTR_ERR_OR_ZERO(gpio);
Thanks,
Hanna
prev parent reply other threads:[~2022-12-14 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 10:27 [PATCH 1/1] i2c: designware: add pinctrl for recovery info as an option Hanna Hawa
2022-12-14 11:42 ` Andy Shevchenko
2022-12-14 13:43 ` Hawa, Hanna [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=806e1787-1f6d-7551-52fd-2e1e25aebaef@amazon.com \
--to=hhhawa@amazon.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=benh@amazon.com \
--cc=dwmw@amazon.co.uk \
--cc=farbere@amazon.com \
--cc=hanochu@amazon.com \
--cc=itamark@amazon.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=jonnyc@amazon.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=ronenk@amazon.com \
--cc=talel@amazon.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