diff options
Diffstat (limited to 'drivers/pinctrl/pinmux.h')
-rw-r--r-- | drivers/pinctrl/pinmux.h | 67 |
1 files changed, 61 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h index dfe81726965c..7680a1703252 100644 --- a/drivers/pinctrl/pinmux.h +++ b/drivers/pinctrl/pinmux.h | |||
@@ -15,9 +15,28 @@ | |||
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, | 16 | void pinmux_init_device_debugfs(struct dentry *devroot, |
17 | struct pinctrl_dev *pctldev); | 17 | struct pinctrl_dev *pctldev); |
18 | void pinmux_init_debugfs(struct dentry *subsys_root); | 18 | int pinmux_request_gpio(struct pinctrl_dev *pctldev, |
19 | int pinctrl_hog_maps(struct pinctrl_dev *pctldev); | 19 | struct pinctrl_gpio_range *range, |
20 | void pinctrl_unhog_maps(struct pinctrl_dev *pctldev); | 20 | unsigned pin, unsigned gpio); |
21 | void pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned pin, | ||
22 | struct pinctrl_gpio_range *range); | ||
23 | int pinmux_gpio_direction(struct pinctrl_dev *pctldev, | ||
24 | struct pinctrl_gpio_range *range, | ||
25 | unsigned pin, bool input); | ||
26 | static inline void pinmux_init_pinctrl_handle(struct pinctrl *p) | ||
27 | { | ||
28 | p->func_selector = UINT_MAX; | ||
29 | INIT_LIST_HEAD(&p->groups); | ||
30 | } | ||
31 | int pinmux_apply_muxmap(struct pinctrl_dev *pctldev, | ||
32 | struct pinctrl *p, | ||
33 | struct device *dev, | ||
34 | const char *devname, | ||
35 | struct pinctrl_map const *map); | ||
36 | void pinmux_put(struct pinctrl *p); | ||
37 | int pinmux_enable(struct pinctrl *p); | ||
38 | void pinmux_disable(struct pinctrl *p); | ||
39 | void pinmux_dbg_show(struct seq_file *s, struct pinctrl *p); | ||
21 | 40 | ||
22 | #else | 41 | #else |
23 | 42 | ||
@@ -31,16 +50,52 @@ static inline void pinmux_init_device_debugfs(struct dentry *devroot, | |||
31 | { | 50 | { |
32 | } | 51 | } |
33 | 52 | ||
34 | static inline void pinmux_init_debugfs(struct dentry *subsys_root) | 53 | static inline int pinmux_request_gpio(struct pinctrl_dev *pctldev, |
54 | struct pinctrl_gpio_range *range, | ||
55 | unsigned pin, unsigned gpio) | ||
56 | { | ||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | static inline void pinmux_free_gpio(struct pinctrl_dev *pctldev, | ||
61 | unsigned pin, | ||
62 | struct pinctrl_gpio_range *range) | ||
63 | { | ||
64 | } | ||
65 | |||
66 | static inline int pinmux_gpio_direction(struct pinctrl_dev *pctldev, | ||
67 | struct pinctrl_gpio_range *range, | ||
68 | unsigned pin, bool input) | ||
69 | { | ||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static inline void pinmux_init_pinctrl_handle(struct pinctrl *p) | ||
35 | { | 74 | { |
36 | } | 75 | } |
37 | 76 | ||
38 | static inline int pinctrl_hog_maps(struct pinctrl_dev *pctldev) | 77 | static inline int pinmux_apply_muxmap(struct pinctrl_dev *pctldev, |
78 | struct pinctrl *p, | ||
79 | struct device *dev, | ||
80 | const char *devname, | ||
81 | struct pinctrl_map const *map) | ||
39 | { | 82 | { |
40 | return 0; | 83 | return 0; |
41 | } | 84 | } |
42 | 85 | ||
43 | static inline void pinctrl_unhog_maps(struct pinctrl_dev *pctldev) | 86 | static inline void pinmux_put(struct pinctrl *p) |
87 | { | ||
88 | } | ||
89 | |||
90 | static inline int pinmux_enable(struct pinctrl *p) | ||
91 | { | ||
92 | } | ||
93 | |||
94 | static inline void pinmux_disable(struct pinctrl *p) | ||
95 | { | ||
96 | } | ||
97 | |||
98 | void pinmux_dbg_show(struct seq_file *s, struct pinctrl *p) | ||
44 | { | 99 | { |
45 | } | 100 | } |
46 | 101 | ||