pinctrl: factor pin control handles over to the core

This moves the per-devices struct pinctrl handles and device map
over from the pinmux part of the subsystem to the core pinctrl part.
This makes the device handles core infrastructure with the goal of
using these handles also for pin configuration, so that device
drivers (or boards etc) will need one and only one handle to the
pin control core.

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Linus Walleij
2012-02-09 19:47:48 +01:00
parent e93bcee00c
commit befe5bdfbb
5 changed files with 783 additions and 639 deletions

View File

@@ -19,9 +19,9 @@
/* This struct is private to the core and should be regarded as a cookie */
struct pinctrl;
#ifdef CONFIG_PINMUX
#ifdef CONFIG_PINCTRL
/* External interface to pinmux */
/* External interface to pin control */
extern int pinctrl_request_gpio(unsigned gpio);
extern void pinctrl_free_gpio(unsigned gpio);
extern int pinctrl_gpio_direction_input(unsigned gpio);
@@ -31,7 +31,7 @@ extern void pinctrl_put(struct pinctrl *p);
extern int pinctrl_enable(struct pinctrl *p);
extern void pinctrl_disable(struct pinctrl *p);
#else /* !CONFIG_PINMUX */
#else /* !CONFIG_PINCTRL */
static inline int pinctrl_request_gpio(unsigned gpio)
{
@@ -70,7 +70,7 @@ static inline void pinctrl_disable(struct pinctrl *p)
{
}
#endif /* CONFIG_PINMUX */
#endif /* CONFIG_PINCTRL */
#ifdef CONFIG_PINCONF