From: Grant Likely <grant.likely@secretlab.ca>
To: Wolfram Sang <w.sang@pengutronix.de>
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 11:16:59 -0700 [thread overview]
Message-ID: <20111213181659.GA29243@ponder.secretlab.ca> (raw)
In-Reply-To: <1323767568-9565-1-git-send-email-w.sang@pengutronix.de>
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?
g.
next prev parent reply other threads:[~2011-12-13 18:17 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 [this message]
2011-12-13 18:23 ` Wolfram Sang
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=20111213181659.GA29243@ponder.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=agust@denx.de \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=w.sang@pengutronix.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;
as well as URLs for NNTP newsgroup(s).