From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Javier Arteaga <javier@emutex.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: intel: Implement intel_gpio_get_direction callback
Date: Tue, 06 Mar 2018 16:59:28 +0200 [thread overview]
Message-ID: <1520348368.10722.440.camel@linux.intel.com> (raw)
In-Reply-To: <1520348165.10722.438.camel@linux.intel.com>
On Tue, 2018-03-06 at 16:56 +0200, Andy Shevchenko wrote:
> On Tue, 2018-03-06 at 14:31 +0000, Javier Arteaga wrote:
> > > +static int intel_gpio_get_direction(struct gpio_chip *chip,
> > > unsigned int offset)
> > > +{
> > > + if (padcfg0 & PADCFG0_PMODE_MASK)
> > > + return -EINVAL;
>
> Actually we might return direction of GPIO function while pin is in
> some
> other mode, though it would probably make not much sense in practice.
One more though, this is a call back for GPIO function anyway, so, above
condition should never happen. I think it's safe to remove it
completely.
> > > +
> > > + return !!(padcfg0 & PADCFG0_GPIOTXDIS);
> > > +}
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2018-03-06 14:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 13:42 [PATCH] pinctrl: intel: Implement intel_gpio_get_direction callback Javier Arteaga
2018-03-06 14:31 ` Javier Arteaga
2018-03-06 14:56 ` Andy Shevchenko
2018-03-06 14:59 ` Andy Shevchenko [this message]
2018-03-06 15:29 ` Javier Arteaga
2018-03-06 18:06 ` Mika Westerberg
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=1520348368.10722.440.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=javier@emutex.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.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