diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-02-20 01:45:45 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-02-22 11:59:32 -0500 |
commit | 03665e0f248d6b7542f72cd7c4ec521109f283c7 (patch) | |
tree | 72761b986a95728508f9d9871f30059ba3a409bc /drivers/pinctrl | |
parent | b2b3e66e40bb60b1aa222d2f712c019653215390 (diff) |
pinctrl: Re-order pinmux.[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.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinmux.c | 56 | ||||
-rw-r--r-- | drivers/pinctrl/pinmux.h | 16 |
2 files changed, 36 insertions, 36 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 5a09cd202208..ea31c4655667 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c | |||
@@ -40,6 +40,34 @@ struct pinmux_group { | |||
40 | unsigned group_selector; | 40 | unsigned group_selector; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | int pinmux_check_ops(struct pinctrl_dev *pctldev) | ||
44 | { | ||
45 | const struct pinmux_ops *ops = pctldev->desc->pmxops; | ||
46 | unsigned selector = 0; | ||
47 | |||
48 | /* Check that we implement required operations */ | ||
49 | if (!ops->list_functions || | ||
50 | !ops->get_function_name || | ||
51 | !ops->get_function_groups || | ||
52 | !ops->enable || | ||
53 | !ops->disable) | ||
54 | return -EINVAL; | ||
55 | |||
56 | /* Check that all functions registered have names */ | ||
57 | while (ops->list_functions(pctldev, selector) >= 0) { | ||
58 | const char *fname = ops->get_function_name(pctldev, | ||
59 | selector); | ||
60 | if (!fname) { | ||
61 | pr_err("pinmux ops has no name for function%u\n", | ||
62 | selector); | ||
63 | return -EINVAL; | ||
64 | } | ||
65 | selector++; | ||
66 | } | ||
67 | |||
68 | return 0; | ||
69 | } | ||
70 | |||
43 | /** | 71 | /** |
44 | * pin_request() - request a single pin to be muxed in, typically for GPIO | 72 | * pin_request() - request a single pin to be muxed in, typically for GPIO |
45 | * @pin: the pin number in the global pin space | 73 | * @pin: the pin number in the global pin space |
@@ -561,34 +589,6 @@ void pinmux_disable(struct pinctrl *p) | |||
561 | } | 589 | } |
562 | } | 590 | } |
563 | 591 | ||
564 | int pinmux_check_ops(struct pinctrl_dev *pctldev) | ||
565 | { | ||
566 | const struct pinmux_ops *ops = pctldev->desc->pmxops; | ||
567 | unsigned selector = 0; | ||
568 | |||
569 | /* Check that we implement required operations */ | ||
570 | if (!ops->list_functions || | ||
571 | !ops->get_function_name || | ||
572 | !ops->get_function_groups || | ||
573 | !ops->enable || | ||
574 | !ops->disable) | ||
575 | return -EINVAL; | ||
576 | |||
577 | /* Check that all functions registered have names */ | ||
578 | while (ops->list_functions(pctldev, selector) >= 0) { | ||
579 | const char *fname = ops->get_function_name(pctldev, | ||
580 | selector); | ||
581 | if (!fname) { | ||
582 | pr_err("pinmux ops has no name for function%u\n", | ||
583 | selector); | ||
584 | return -EINVAL; | ||
585 | } | ||
586 | selector++; | ||
587 | } | ||
588 | |||
589 | return 0; | ||
590 | } | ||
591 | |||
592 | #ifdef CONFIG_DEBUG_FS | 592 | #ifdef CONFIG_DEBUG_FS |
593 | 593 | ||
594 | /* Called from pincontrol core */ | 594 | /* Called from pincontrol core */ |
diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h index 7680a1703252..84b8fe946b5c 100644 --- a/drivers/pinctrl/pinmux.h +++ b/drivers/pinctrl/pinmux.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #ifdef CONFIG_PINMUX | 13 | #ifdef CONFIG_PINMUX |
14 | 14 | ||
15 | int pinmux_check_ops(struct pinctrl_dev *pctldev); | 15 | int pinmux_check_ops(struct pinctrl_dev *pctldev); |
16 | void pinmux_init_device_debugfs(struct dentry *devroot, | ||
17 | struct pinctrl_dev *pctldev); | ||
18 | int pinmux_request_gpio(struct pinctrl_dev *pctldev, | 16 | int pinmux_request_gpio(struct pinctrl_dev *pctldev, |
19 | struct pinctrl_gpio_range *range, | 17 | struct pinctrl_gpio_range *range, |
20 | unsigned pin, unsigned gpio); | 18 | unsigned pin, unsigned gpio); |
@@ -36,6 +34,8 @@ int pinmux_apply_muxmap(struct pinctrl_dev *pctldev, | |||
36 | void pinmux_put(struct pinctrl *p); | 34 | void pinmux_put(struct pinctrl *p); |
37 | int pinmux_enable(struct pinctrl *p); | 35 | int pinmux_enable(struct pinctrl *p); |
38 | void pinmux_disable(struct pinctrl *p); | 36 | void pinmux_disable(struct pinctrl *p); |
37 | void pinmux_init_device_debugfs(struct dentry *devroot, | ||
38 | struct pinctrl_dev *pctldev); | ||
39 | void pinmux_dbg_show(struct seq_file *s, struct pinctrl *p); | 39 | void pinmux_dbg_show(struct seq_file *s, struct pinctrl *p); |
40 | 40 | ||
41 | #else | 41 | #else |
@@ -45,11 +45,6 @@ static inline int pinmux_check_ops(struct pinctrl_dev *pctldev) | |||
45 | return 0; | 45 | return 0; |
46 | } | 46 | } |
47 | 47 | ||
48 | static inline void pinmux_init_device_debugfs(struct dentry *devroot, | ||
49 | struct pinctrl_dev *pctldev) | ||
50 | { | ||
51 | } | ||
52 | |||
53 | static inline int pinmux_request_gpio(struct pinctrl_dev *pctldev, | 48 | static inline int pinmux_request_gpio(struct pinctrl_dev *pctldev, |
54 | struct pinctrl_gpio_range *range, | 49 | struct pinctrl_gpio_range *range, |
55 | unsigned pin, unsigned gpio) | 50 | unsigned pin, unsigned gpio) |
@@ -95,7 +90,12 @@ static inline void pinmux_disable(struct pinctrl *p) | |||
95 | { | 90 | { |
96 | } | 91 | } |
97 | 92 | ||
98 | void pinmux_dbg_show(struct seq_file *s, struct pinctrl *p) | 93 | static inline void pinmux_init_device_debugfs(struct dentry *devroot, |
94 | struct pinctrl_dev *pctldev) | ||
95 | { | ||
96 | } | ||
97 | |||
98 | static inline void pinmux_dbg_show(struct seq_file *s, struct pinctrl *p) | ||
99 | { | 99 | { |
100 | } | 100 | } |
101 | 101 | ||