[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdaL=f7A6se63yXO=bwySC_S2yRd4r3AEfTAy6YtGi5-CQ@mail.gmail.com>
Date: Thu, 16 Feb 2012 20:16:36 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Alessandro Rubini <rubini@...dd.com>
Cc: linux-kernel@...r.kernel.org, giancarlo.asnaghi@...com,
alan@...ux.intel.com, sameo@...ux.intel.com,
grant.likely@...retlab.ca, linus.walleij@...ricsson.com
Subject: Re: [PATCH V2 2/2] gpio: add STA2X11 GPIO block
On Thu, Feb 16, 2012 at 2:00 PM, Alessandro Rubini <rubini@...dd.com> wrote:
> +/*
> + * Special method: alternate functions and pullup/pulldown. This will
> + * need to be exported to other drivers, adding a way to retrieve
> + * the gsta_gpio structure from their own pci device
> + */
> +void gsta_set_config(struct gsta_gpio *chip, int nr, unsigned cfg)
> +{
(...)
> + if (cfg == PINMUX_TYPE_NONE)
(...)
> + if (cfg == PINMUX_TYPE_FUNCTION)
(...)
> + if (cfg == PINMUX_TYPE_FUNCTION) {
(...)
> + case PINMUX_TYPE_OUTPUT_LOW:
(...)
> + case PINMUX_TYPE_OUTPUT_HIGH:
(...)
> + case PINMUX_TYPE_INPUT:
(...)
> + case PINMUX_TYPE_INPUT_PULLUP:
(...)
> + case PINMUX_TYPE_INPUT_PULLDOWN:
We have created the pin control subsystem to handle things like
this. (Muxing and complex control.)
Please create a driver in drivers/pinctrl/pinctrl-sta2x11.c that
expose both a pinctrl and a GPIOlib interface. The GPIOlib
interface can call into the pin control portions just fine.
We've had some refactoring in the pin control subsystem recently
so check linux-next for the latest API. The documentation in
Documentation/pinctrl.txt should be pretty uptodate, else
tell me!
I'm giving a talk about pin control at ELC tomorrow, mail
me if you want a copy of the slides!
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists