diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-02-09 01:23:28 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-02-10 15:33:02 -0500 |
commit | e93bcee00c43e2bd4037291262111016f4c05793 (patch) | |
tree | e69b5f7ffffb36096949eabdc0526173b25f695d /include/linux | |
parent | 28a8d14cc74a0180323d9150c3d3dbf9dd60d55a (diff) |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/pinctrl/consumer.h | 34 | ||||
-rw-r--r-- | include/linux/pinctrl/machine.h | 26 |
2 files changed, 30 insertions, 30 deletions
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index 9c8513d5d0fb..c7d061776293 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h | |||
@@ -17,56 +17,56 @@ | |||
17 | #include "pinctrl.h" | 17 | #include "pinctrl.h" |
18 | 18 | ||
19 | /* This struct is private to the core and should be regarded as a cookie */ | 19 | /* This struct is private to the core and should be regarded as a cookie */ |
20 | struct pinmux; | 20 | struct pinctrl; |
21 | 21 | ||
22 | #ifdef CONFIG_PINMUX | 22 | #ifdef CONFIG_PINMUX |
23 | 23 | ||
24 | /* External interface to pinmux */ | 24 | /* External interface to pinmux */ |
25 | extern int pinmux_request_gpio(unsigned gpio); | 25 | extern int pinctrl_request_gpio(unsigned gpio); |
26 | extern void pinmux_free_gpio(unsigned gpio); | 26 | extern void pinctrl_free_gpio(unsigned gpio); |
27 | extern int pinmux_gpio_direction_input(unsigned gpio); | 27 | extern int pinctrl_gpio_direction_input(unsigned gpio); |
28 | extern int pinmux_gpio_direction_output(unsigned gpio); | 28 | extern int pinctrl_gpio_direction_output(unsigned gpio); |
29 | extern struct pinmux * __must_check pinmux_get(struct device *dev, const char *name); | 29 | extern struct pinctrl * __must_check pinctrl_get(struct device *dev, const char *name); |
30 | extern void pinmux_put(struct pinmux *pmx); | 30 | extern void pinctrl_put(struct pinctrl *p); |
31 | extern int pinmux_enable(struct pinmux *pmx); | 31 | extern int pinctrl_enable(struct pinctrl *p); |
32 | extern void pinmux_disable(struct pinmux *pmx); | 32 | extern void pinctrl_disable(struct pinctrl *p); |
33 | 33 | ||
34 | #else /* !CONFIG_PINMUX */ | 34 | #else /* !CONFIG_PINMUX */ |
35 | 35 | ||
36 | static inline int pinmux_request_gpio(unsigned gpio) | 36 | static inline int pinctrl_request_gpio(unsigned gpio) |
37 | { | 37 | { |
38 | return 0; | 38 | return 0; |
39 | } | 39 | } |
40 | 40 | ||
41 | static inline void pinmux_free_gpio(unsigned gpio) | 41 | static inline void pinctrl_free_gpio(unsigned gpio) |
42 | { | 42 | { |
43 | } | 43 | } |
44 | 44 | ||
45 | static inline int pinmux_gpio_direction_input(unsigned gpio) | 45 | static inline int pinctrl_gpio_direction_input(unsigned gpio) |
46 | { | 46 | { |
47 | return 0; | 47 | return 0; |
48 | } | 48 | } |
49 | 49 | ||
50 | static inline int pinmux_gpio_direction_output(unsigned gpio) | 50 | static inline int pinctrl_gpio_direction_output(unsigned gpio) |
51 | { | 51 | { |
52 | return 0; | 52 | return 0; |
53 | } | 53 | } |
54 | 54 | ||
55 | static inline struct pinmux * __must_check pinmux_get(struct device *dev, const char *name) | 55 | static inline struct pinctrl * __must_check pinctrl_get(struct device *dev, const char *name) |
56 | { | 56 | { |
57 | return NULL; | 57 | return NULL; |
58 | } | 58 | } |
59 | 59 | ||
60 | static inline void pinmux_put(struct pinmux *pmx) | 60 | static inline void pinctrl_put(struct pinctrl *p) |
61 | { | 61 | { |
62 | } | 62 | } |
63 | 63 | ||
64 | static inline int pinmux_enable(struct pinmux *pmx) | 64 | static inline int pinctrl_enable(struct pinctrl *p) |
65 | { | 65 | { |
66 | return 0; | 66 | return 0; |
67 | } | 67 | } |
68 | 68 | ||
69 | static inline void pinmux_disable(struct pinmux *pmx) | 69 | static inline void pinctrl_disable(struct pinctrl *p) |
70 | { | 70 | { |
71 | } | 71 | } |
72 | 72 | ||
diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h index f8593fdc6466..a2ab524a0106 100644 --- a/include/linux/pinctrl/machine.h +++ b/include/linux/pinctrl/machine.h | |||
@@ -9,11 +9,11 @@ | |||
9 | * | 9 | * |
10 | * License terms: GNU General Public License (GPL) version 2 | 10 | * License terms: GNU General Public License (GPL) version 2 |
11 | */ | 11 | */ |
12 | #ifndef __LINUX_PINMUX_MACHINE_H | 12 | #ifndef __LINUX_PINCTRL_MACHINE_H |
13 | #define __LINUX_PINMUX_MACHINE_H | 13 | #define __LINUX_PINCTRL_MACHINE_H |
14 | 14 | ||
15 | /** | 15 | /** |
16 | * struct pinmux_map - boards/machines shall provide this map for devices | 16 | * struct pinctrl_map - boards/machines shall provide this map for devices |
17 | * @name: the name of this specific map entry for the particular machine. | 17 | * @name: the name of this specific map entry for the particular machine. |
18 | * This is the second parameter passed to pinmux_get() when you want | 18 | * This is the second parameter passed to pinmux_get() when you want |
19 | * to have several mappings to the same device | 19 | * to have several mappings to the same device |
@@ -34,7 +34,7 @@ | |||
34 | * a pinmux device supporting it is registered. These maps will not be | 34 | * a pinmux device supporting it is registered. These maps will not be |
35 | * disabled and put until the system shuts down. | 35 | * disabled and put until the system shuts down. |
36 | */ | 36 | */ |
37 | struct pinmux_map { | 37 | struct pinctrl_map { |
38 | const char *name; | 38 | const char *name; |
39 | const char *ctrl_dev_name; | 39 | const char *ctrl_dev_name; |
40 | const char *function; | 40 | const char *function; |
@@ -47,41 +47,41 @@ struct pinmux_map { | |||
47 | * Convenience macro to set a simple map from a certain pin controller and a | 47 | * Convenience macro to set a simple map from a certain pin controller and a |
48 | * certain function to a named device | 48 | * certain function to a named device |
49 | */ | 49 | */ |
50 | #define PINMUX_MAP(a, b, c, d) \ | 50 | #define PIN_MAP(a, b, c, d) \ |
51 | { .name = a, .ctrl_dev_name = b, .function = c, .dev_name = d } | 51 | { .name = a, .ctrl_dev_name = b, .function = c, .dev_name = d } |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Convenience macro to map a system function onto a certain pinctrl device. | 54 | * Convenience macro to map a system function onto a certain pinctrl device. |
55 | * System functions are not assigned to a particular device. | 55 | * System functions are not assigned to a particular device. |
56 | */ | 56 | */ |
57 | #define PINMUX_MAP_SYS(a, b, c) \ | 57 | #define PIN_MAP_SYS(a, b, c) \ |
58 | { .name = a, .ctrl_dev_name = b, .function = c } | 58 | { .name = a, .ctrl_dev_name = b, .function = c } |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * Convenience macro to map a system function onto a certain pinctrl device, | 61 | * Convenience macro to map a system function onto a certain pinctrl device, |
62 | * to be hogged by the pinmux core until the system shuts down. | 62 | * to be hogged by the pin control core until the system shuts down. |
63 | */ | 63 | */ |
64 | #define PINMUX_MAP_SYS_HOG(a, b, c) \ | 64 | #define PIN_MAP_SYS_HOG(a, b, c) \ |
65 | { .name = a, .ctrl_dev_name = b, .function = c, \ | 65 | { .name = a, .ctrl_dev_name = b, .function = c, \ |
66 | .hog_on_boot = true } | 66 | .hog_on_boot = true } |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * Convenience macro to map a system function onto a certain pinctrl device | 69 | * Convenience macro to map a system function onto a certain pinctrl device |
70 | * using a specified group, to be hogged by the pinmux core until the system | 70 | * using a specified group, to be hogged by the pin control core until the |
71 | * shuts down. | 71 | * system shuts down. |
72 | */ | 72 | */ |
73 | #define PINMUX_MAP_SYS_HOG_GROUP(a, b, c, d) \ | 73 | #define PIN_MAP_SYS_HOG_GROUP(a, b, c, d) \ |
74 | { .name = a, .ctrl_dev_name = b, .function = c, .group = d, \ | 74 | { .name = a, .ctrl_dev_name = b, .function = c, .group = d, \ |
75 | .hog_on_boot = true } | 75 | .hog_on_boot = true } |
76 | 76 | ||
77 | #ifdef CONFIG_PINMUX | 77 | #ifdef CONFIG_PINMUX |
78 | 78 | ||
79 | extern int pinmux_register_mappings(struct pinmux_map const *map, | 79 | extern int pinctrl_register_mappings(struct pinctrl_map const *map, |
80 | unsigned num_maps); | 80 | unsigned num_maps); |
81 | 81 | ||
82 | #else | 82 | #else |
83 | 83 | ||
84 | static inline int pinmux_register_mappings(struct pinmux_map const *map, | 84 | static inline int pinctrl_register_mappings(struct pinctrl_map const *map, |
85 | unsigned num_maps) | 85 | unsigned num_maps) |
86 | { | 86 | { |
87 | return 0; | 87 | return 0; |