aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinconf.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-02-20 01:45:46 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-02-22 11:59:32 -0500
commit2b694250174980382bddcb00e1de7654ecdf6f1f (patch)
tree689d6ef2c9bca17f62c52b5d84bfd998dd2f044c /drivers/pinctrl/pinconf.c
parent03665e0f248d6b7542f72cd7c4ec521109f283c7 (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.c31
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
26int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin, 26int 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
39static 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}
64EXPORT_SYMBOL(pin_config_get); 77EXPORT_SYMBOL(pin_config_get);
65 78
66int pin_config_set_for_pin(struct pinctrl_dev *pctldev, unsigned pin, 79static 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}
139EXPORT_SYMBOL(pin_config_group_get); 152EXPORT_SYMBOL(pin_config_group_get);
140 153
141
142int pin_config_group_set(const char *dev_name, const char *pin_group, 154int 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}
206EXPORT_SYMBOL(pin_config_group_set); 218EXPORT_SYMBOL(pin_config_group_set);
207 219
208int 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
223static void pinconf_dump_pin(struct pinctrl_dev *pctldev, 222static void pinconf_dump_pin(struct pinctrl_dev *pctldev,