From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Jisheng Zhang <Jisheng.Zhang@synaptics.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>
Cc: linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] i2c: designware: select gpio/default pin when prepare/unprepare recovery
Date: Thu, 13 Sep 2018 16:50:30 +0300 [thread overview]
Message-ID: <d4ebb8a5-9e56-20c5-2bda-03ca2a40378e@linux.intel.com> (raw)
In-Reply-To: <20180913162132.17c9c2b3@xhacker.debian>
On 09/13/2018 11:21 AM, Jisheng Zhang wrote:
> On some platforms, the sda/scl pins are muxed with gpio functions, so
> they could be used for recovery. Select the gpio/default pin function
> when prepare/unprepare recovery.
>
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> ---
>
> since v1:
> - use IS_ERR_OR_NULL
>
> drivers/i2c/busses/i2c-designware-core.h | 3 +++
> drivers/i2c/busses/i2c-designware-master.c | 22 ++++++++++++++++++++++
> 2 files changed, 25 insertions(+)
>
...
> + pinctrl = devm_pinctrl_get(dev->dev);
> + if (PTR_ERR(pinctrl) == -EPROBE_DEFER)
> + return -EPROBE_DEFER;
> + if (!IS_ERR_OR_NULL(pinctrl)) {
> + dev->pinctrl = pinctrl;
> + s = pinctrl_lookup_state(pinctrl, PINCTRL_STATE_DEFAULT);
> + if (!IS_ERR_OR_NULL(s))
> + dev->pins_default = s;
> + s = pinctrl_lookup_state(pinctrl, "gpio");
> + if (!IS_ERR_OR_NULL(s))
> + dev->pins_gpio = s;
> + }
> +
Should these be documented in
Documentation/devicetree/bindings/i2c/i2c-designware.txt?
--
Jarkko
prev parent reply other threads:[~2018-09-13 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 8:21 [PATCH v2] i2c: designware: select gpio/default pin when prepare/unprepare recovery Jisheng Zhang
2018-09-13 13:50 ` Jarkko Nikula [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=d4ebb8a5-9e56-20c5-2bda-03ca2a40378e@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=Jisheng.Zhang@synaptics.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=wsa@the-dreams.de \
/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