diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-02-20 01:45:46 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-02-22 11:59:32 -0500 |
commit | 2b694250174980382bddcb00e1de7654ecdf6f1f (patch) | |
tree | 689d6ef2c9bca17f62c52b5d84bfd998dd2f044c /drivers/pinctrl/pinconf.c | |
parent | 03665e0f248d6b7542f72cd7c4ec521109f283c7 (diff) |
pinctrl: Re-order pinconf.[ch] to match each-other
Modify the two files so that the order of function prototypes in the
header matches the order of implementations in the .c file.
Don't prototype a couple of internal functions.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinconf.c')
-rw-r--r-- | drivers/pinctrl/pinconf.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index b74f64af1923..0c9d08d84694 100644 --- a/drivers/pinctrl/pinconf.c +++ b/drivers/pinctrl/pinconf.c | |||
@@ -23,7 +23,20 @@ | |||
23 | #include "core.h" | 23 | #include "core.h" |
24 | #include "pinconf.h" | 24 | #include "pinconf.h" |
25 | 25 | ||
26 | int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin, | 26 | int pinconf_check_ops(struct pinctrl_dev *pctldev) |
27 | { | ||
28 | const struct pinconf_ops *ops = pctldev->desc->confops; | ||
29 | |||
30 | /* We must be able to read out pin status */ | ||
31 | if (!ops->pin_config_get && !ops->pin_config_group_get) | ||
32 | return -EINVAL; | ||
33 | /* We have to be able to config the pins in SOME way */ | ||
34 | if (!ops->pin_config_set && !ops->pin_config_group_set) | ||
35 | return -EINVAL; | ||
36 | return 0; | ||
37 | } | ||
38 | |||
39 | static int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin, | ||
27 | unsigned long *config) | 40 | unsigned long *config) |
28 | { | 41 | { |
29 | const struct pinconf_ops *ops = pctldev->desc->confops; | 42 | const struct pinconf_ops *ops = pctldev->desc->confops; |
@@ -63,7 +76,7 @@ int pin_config_get(const char *dev_name, const char *name, | |||
63 | } | 76 | } |
64 | EXPORT_SYMBOL(pin_config_get); | 77 | EXPORT_SYMBOL(pin_config_get); |
65 | 78 | ||
66 | int pin_config_set_for_pin(struct pinctrl_dev *pctldev, unsigned pin, | 79 | static int pin_config_set_for_pin(struct pinctrl_dev *pctldev, unsigned pin, |
67 | unsigned long config) | 80 | unsigned long config) |
68 | { | 81 | { |
69 | const struct pinconf_ops *ops = pctldev->desc->confops; | 82 | const struct pinconf_ops *ops = pctldev->desc->confops; |
@@ -138,7 +151,6 @@ int pin_config_group_get(const char *dev_name, const char *pin_group, | |||
138 | } | 151 | } |
139 | EXPORT_SYMBOL(pin_config_group_get); | 152 | EXPORT_SYMBOL(pin_config_group_get); |
140 | 153 | ||
141 | |||
142 | int pin_config_group_set(const char *dev_name, const char *pin_group, | 154 | int pin_config_group_set(const char *dev_name, const char *pin_group, |
143 | unsigned long config) | 155 | unsigned long config) |
144 | { | 156 | { |
@@ -205,19 +217,6 @@ int pin_config_group_set(const char *dev_name, const char *pin_group, | |||
205 | } | 217 | } |
206 | EXPORT_SYMBOL(pin_config_group_set); | 218 | EXPORT_SYMBOL(pin_config_group_set); |
207 | 219 | ||
208 | int pinconf_check_ops(struct pinctrl_dev *pctldev) | ||
209 | { | ||
210 | const struct pinconf_ops *ops = pctldev->desc->confops; | ||
211 | |||
212 | /* We must be able to read out pin status */ | ||
213 | if (!ops->pin_config_get && !ops->pin_config_group_get) | ||
214 | return -EINVAL; | ||
215 | /* We have to be able to config the pins in SOME way */ | ||
216 | if (!ops->pin_config_set && !ops->pin_config_group_set) | ||
217 | return -EINVAL; | ||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | #ifdef CONFIG_DEBUG_FS | 220 | #ifdef CONFIG_DEBUG_FS |
222 | 221 | ||
223 | static void pinconf_dump_pin(struct pinctrl_dev *pctldev, | 222 | static void pinconf_dump_pin(struct pinctrl_dev *pctldev, |