diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-03-02 15:05:48 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-03-05 05:25:11 -0500 |
commit | 1e2082b520721734c358f776d34a069867214c8e (patch) | |
tree | 4d11e15a4127ad69faf7555864480a6fafe5422c /drivers/pinctrl/pinmux.h | |
parent | 6e5e959dde0d92d177f035652aeaa77f9330c9c6 (diff) |
pinctrl: enhance mapping table to support pin config operations
The pinctrl mapping table can now contain entries to:
* Set the mux function of a pin group
* Apply a set of pin config options to a pin or a group
This allows pinctrl_select_state() to apply pin configs settings as well
as mux settings.
v3: Fix find_pinctrl() to iterate over the correct list.
s/_MUX_CONFIGS_/_CONFIGS_/ in mapping table macros.
Fix documentation to use correct mapping table macro.
v2: Added numerous extra PIN_MAP_*() special-case macros.
Fixed kerneldoc typo. Delete pinctrl_get_pin_id() and
replace it with pin_get_from_name(). Various minor fixes.
Updates due to rebase.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinmux.h')
-rw-r--r-- | drivers/pinctrl/pinmux.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h index 1500ae88f87c..6fc47003e95d 100644 --- a/drivers/pinctrl/pinmux.h +++ b/drivers/pinctrl/pinmux.h | |||
@@ -14,6 +14,8 @@ | |||
14 | 14 | ||
15 | int pinmux_check_ops(struct pinctrl_dev *pctldev); | 15 | int pinmux_check_ops(struct pinctrl_dev *pctldev); |
16 | 16 | ||
17 | int pinmux_validate_map(struct pinctrl_map const *map, int i); | ||
18 | |||
17 | int pinmux_request_gpio(struct pinctrl_dev *pctldev, | 19 | int pinmux_request_gpio(struct pinctrl_dev *pctldev, |
18 | struct pinctrl_gpio_range *range, | 20 | struct pinctrl_gpio_range *range, |
19 | unsigned pin, unsigned gpio); | 21 | unsigned pin, unsigned gpio); |
@@ -29,7 +31,9 @@ void pinmux_free_setting(struct pinctrl_setting const *setting); | |||
29 | int pinmux_enable_setting(struct pinctrl_setting const *setting); | 31 | int pinmux_enable_setting(struct pinctrl_setting const *setting); |
30 | void pinmux_disable_setting(struct pinctrl_setting const *setting); | 32 | void pinmux_disable_setting(struct pinctrl_setting const *setting); |
31 | 33 | ||
32 | void pinmux_dbg_show(struct seq_file *s, struct pinctrl_setting const *setting); | 34 | void pinmux_show_map(struct seq_file *s, struct pinctrl_map const *map); |
35 | void pinmux_show_setting(struct seq_file *s, | ||
36 | struct pinctrl_setting const *setting); | ||
33 | void pinmux_init_device_debugfs(struct dentry *devroot, | 37 | void pinmux_init_device_debugfs(struct dentry *devroot, |
34 | struct pinctrl_dev *pctldev); | 38 | struct pinctrl_dev *pctldev); |
35 | 39 | ||
@@ -40,6 +44,11 @@ static inline int pinmux_check_ops(struct pinctrl_dev *pctldev) | |||
40 | return 0; | 44 | return 0; |
41 | } | 45 | } |
42 | 46 | ||
47 | static inline int pinmux_validate_map(struct pinctrl_map const *map, int i) | ||
48 | { | ||
49 | return 0; | ||
50 | } | ||
51 | |||
43 | static inline int pinmux_request_gpio(struct pinctrl_dev *pctldev, | 52 | static inline int pinmux_request_gpio(struct pinctrl_dev *pctldev, |
44 | struct pinctrl_gpio_range *range, | 53 | struct pinctrl_gpio_range *range, |
45 | unsigned pin, unsigned gpio) | 54 | unsigned pin, unsigned gpio) |
@@ -80,12 +89,18 @@ static inline void pinmux_disable_setting( | |||
80 | { | 89 | { |
81 | } | 90 | } |
82 | 91 | ||
83 | static inline void pinmux_init_device_debugfs(struct dentry *devroot, | 92 | static inline void pinmux_show_map(struct seq_file *s, |
84 | struct pinctrl_dev *pctldev) | 93 | struct pinctrl_map const *map) |
94 | { | ||
95 | } | ||
96 | |||
97 | static inline void pinmux_show_setting(struct seq_file *s, | ||
98 | struct pinctrl_setting const *setting) | ||
85 | { | 99 | { |
86 | } | 100 | } |
87 | 101 | ||
88 | static inline void pinmux_dbg_show(struct seq_file *s, struct pinctrl *p) | 102 | static inline void pinmux_init_device_debugfs(struct dentry *devroot, |
103 | struct pinctrl_dev *pctldev) | ||
89 | { | 104 | { |
90 | } | 105 | } |
91 | 106 | ||