pinctrl: move generic functions to the pinctrl_ namespace
Since we want to use the former pinmux handles and mapping tables for generic control involving both muxing and configuration we begin refactoring by renaming them from pinmux_* to pinctrl_*. ChangeLog v1->v2: - Also rename the PINMUX_* macros in machine.h to PIN_ as indicated in the documentation so as to reflect the generic nature of these mapping entries from now on. Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
28a8d14cc7
commit
e93bcee00c
9 changed files with 294 additions and 293 deletions
|
@ -17,56 +17,56 @@
|
|||
#include "pinctrl.h"
|
||||
|
||||
/* This struct is private to the core and should be regarded as a cookie */
|
||||
struct pinmux;
|
||||
struct pinctrl;
|
||||
|
||||
#ifdef CONFIG_PINMUX
|
||||
|
||||
/* External interface to pinmux */
|
||||
extern int pinmux_request_gpio(unsigned gpio);
|
||||
extern void pinmux_free_gpio(unsigned gpio);
|
||||
extern int pinmux_gpio_direction_input(unsigned gpio);
|
||||
extern int pinmux_gpio_direction_output(unsigned gpio);
|
||||
extern struct pinmux * __must_check pinmux_get(struct device *dev, const char *name);
|
||||
extern void pinmux_put(struct pinmux *pmx);
|
||||
extern int pinmux_enable(struct pinmux *pmx);
|
||||
extern void pinmux_disable(struct pinmux *pmx);
|
||||
extern int pinctrl_request_gpio(unsigned gpio);
|
||||
extern void pinctrl_free_gpio(unsigned gpio);
|
||||
extern int pinctrl_gpio_direction_input(unsigned gpio);
|
||||
extern int pinctrl_gpio_direction_output(unsigned gpio);
|
||||
extern struct pinctrl * __must_check pinctrl_get(struct device *dev, const char *name);
|
||||
extern void pinctrl_put(struct pinctrl *p);
|
||||
extern int pinctrl_enable(struct pinctrl *p);
|
||||
extern void pinctrl_disable(struct pinctrl *p);
|
||||
|
||||
#else /* !CONFIG_PINMUX */
|
||||
|
||||
static inline int pinmux_request_gpio(unsigned gpio)
|
||||
static inline int pinctrl_request_gpio(unsigned gpio)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void pinmux_free_gpio(unsigned gpio)
|
||||
static inline void pinctrl_free_gpio(unsigned gpio)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int pinmux_gpio_direction_input(unsigned gpio)
|
||||
static inline int pinctrl_gpio_direction_input(unsigned gpio)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int pinmux_gpio_direction_output(unsigned gpio)
|
||||
static inline int pinctrl_gpio_direction_output(unsigned gpio)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline struct pinmux * __must_check pinmux_get(struct device *dev, const char *name)
|
||||
static inline struct pinctrl * __must_check pinctrl_get(struct device *dev, const char *name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void pinmux_put(struct pinmux *pmx)
|
||||
static inline void pinctrl_put(struct pinctrl *p)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int pinmux_enable(struct pinmux *pmx)
|
||||
static inline int pinctrl_enable(struct pinctrl *p)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void pinmux_disable(struct pinmux *pmx)
|
||||
static inline void pinctrl_disable(struct pinctrl *p)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue