From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 3/3] gpio: pxa: request pinmux function for gpio
Date: Sun, 1 Jan 2012 15:22:07 +0100 [thread overview]
Message-ID: <CACRpkda_0ECowDhg2wWx9wLHgVVcRKycLYR=AgNrHVBum2ibLw@mail.gmail.com> (raw)
In-Reply-To: <1324541855-19911-4-git-send-email-haojian.zhuang@marvell.com>
On Thu, Dec 22, 2011 at 9:17 AM, Haojian Zhuang
<haojian.zhuang@marvell.com> wrote:
> While gpio is requested for pxa, gpio driver will request function ready
> on pin.
(...)
> +#ifdef CONFIG_PINMUX
> +static int pxa_gpio_request(struct gpio_chip *chip, unsigned offset)
> +{
> + ? ? ? return pinmux_request_gpio(chip->base + offset);
> +}
> +
> +static void pxa_gpio_free(struct gpio_chip *chip, unsigned offset)
> +{
> + ? ? ? pinmux_free_gpio(chip->base + offset);
> +}
> +#else
> +static int pxa_gpio_request(struct gpio_chip *chip, unsigned offset) {return 0;}
> +static void pxa_gpio_free(struct gpio_chip *chip, unsigned offset) {}
> +#endif
> +
Skip the #ifdef, the pinmux portion of pinctrl already provides stubs if
CONFIG_PINMUX is not selected. See <linux/pinctrl/pinmux.h>
Yours,
Linus Walleij
next prev parent reply other threads:[~2012-01-01 14:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 8:17 [PATCH v3 0/3] implement pinmux for arch-mmp Haojian Zhuang
2011-12-22 8:17 ` [PATCH v3 2/3] ARM: mmp: enable pinmux in mmp platform Haojian Zhuang
2012-01-01 14:19 ` Linus Walleij
2011-12-22 8:17 ` [PATCH v3 3/3] gpio: pxa: request pinmux function for gpio Haojian Zhuang
2012-01-01 14:22 ` Linus Walleij [this message]
[not found] ` <1324541855-19911-2-git-send-email-haojian.zhuang@marvell.com>
2012-01-01 14:14 ` [PATCH v3 1/3] pinctrl: enable pinmux for mmp series Linus Walleij
2012-01-01 14:15 ` Linus Walleij
2012-01-04 2:20 ` Haojian Zhuang
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='CACRpkda_0ECowDhg2wWx9wLHgVVcRKycLYR=AgNrHVBum2ibLw@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).