From: Wolfram Sang <w.sang@pengutronix.de>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-dev@ozlabs.org, Anatolij Gustschin <agust@denx.de>,
linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@stericsson.com>
Subject: Re: [PATCH RESEND] gpio: mpc8xxx: don't allow input-only pins to be output for MPC5121
Date: Tue, 13 Dec 2011 19:23:07 +0100 [thread overview]
Message-ID: <20111213182307.GA2736@pengutronix.de> (raw)
In-Reply-To: <20111213181659.GA29243@ponder.secretlab.ca>
[-- Attachment #1: Type: text/plain, Size: 1681 bytes --]
On Tue, Dec 13, 2011 at 11:16:59AM -0700, Grant Likely wrote:
> On Tue, Dec 13, 2011 at 10:12:48AM +0100, Wolfram Sang wrote:
> > Add a 5121-custom reject if an input-only pin is requested to be output
> > (see 18.3.1.1 in the refman). Also, rewrite mach-specific quirk setup to
> > consume less lines which scales better.
> >
> > Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> > ---
> > drivers/gpio/gpio-mpc8xxx.c | 17 ++++++++++++-----
> > 1 files changed, 12 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
> > index ec3fcf0..25dc736 100644
> > --- a/drivers/gpio/gpio-mpc8xxx.c
> > +++ b/drivers/gpio/gpio-mpc8xxx.c
> > @@ -115,6 +115,14 @@ static int mpc8xxx_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
> > return 0;
> > }
> >
> > +static int mpc5121_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
> > +{
> > + /* GPIO 28..31 are input only on MPC5121 */
> > + if (gpio >= 28)
> > + return -EINVAL;
> > +
> > + return mpc8xxx_gpio_dir_out(gc, gpio, val);
> > +}
> > static int mpc8xxx_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
>
> This actually caused a build failure. mpc8xxx_gpio_dir_out() was used before
> it was declared. I moved the symbol to immediately below and applied anyway,
> but how did it compile for you? Should I drop this patch until you retest?
Huh, I am surprised as well. Will investigate tomorrow. Sorry for the
inconvenience.
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
prev parent reply other threads:[~2011-12-13 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 9:12 [PATCH RESEND] gpio: mpc8xxx: don't allow input-only pins to be output for MPC5121 Wolfram Sang
2011-12-13 9:52 ` Anatolij Gustschin
2011-12-13 10:03 ` Wolfram Sang
2011-12-13 18:07 ` Grant Likely
2011-12-13 18:16 ` Grant Likely
2011-12-13 18:23 ` Wolfram Sang [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=20111213182307.GA2736@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=agust@denx.de \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).