lkml.org 
[lkml]   [2012]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 3/3] gpio: pxa: request pinmux function for gpio
From
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-01-01 15:25    [W:0.073 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site