aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinmux.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinmux.h')
-rw-r--r--drivers/pinctrl/pinmux.h67
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 @@
15int pinmux_check_ops(struct pinctrl_dev *pctldev); 15int pinmux_check_ops(struct pinctrl_dev *pctldev);
16void pinmux_init_device_debugfs(struct dentry *devroot, 16void pinmux_init_device_debugfs(struct dentry *devroot,
17 struct pinctrl_dev *pctldev); 17 struct pinctrl_dev *pctldev);
18void pinmux_init_debugfs(struct dentry *subsys_root); 18int pinmux_request_gpio(struct pinctrl_dev *pctldev,
19int pinctrl_hog_maps(struct pinctrl_dev *pctldev); 19 struct pinctrl_gpio_range *range,
20void pinctrl_unhog_maps(struct pinctrl_dev *pctldev); 20 unsigned pin, unsigned gpio);
21void pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned pin,
22 struct pinctrl_gpio_range *range);
23int pinmux_gpio_direction(struct pinctrl_dev *pctldev,
24 struct pinctrl_gpio_range *range,
25 unsigned pin, bool input);
26static inline void pinmux_init_pinctrl_handle(struct pinctrl *p)
27{
28 p->func_selector = UINT_MAX;
29 INIT_LIST_HEAD(&p->groups);
30}
31int 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);
36void pinmux_put(struct pinctrl *p);
37int pinmux_enable(struct pinctrl *p);
38void pinmux_disable(struct pinctrl *p);
39void 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
34static inline void pinmux_init_debugfs(struct dentry *subsys_root) 53static 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
60static inline void pinmux_free_gpio(struct pinctrl_dev *pctldev,
61 unsigned pin,
62 struct pinctrl_gpio_range *range)
63{
64}
65
66static 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
73static inline void pinmux_init_pinctrl_handle(struct pinctrl *p)
35{ 74{
36} 75}
37 76
38static inline int pinctrl_hog_maps(struct pinctrl_dev *pctldev) 77static 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
43static inline void pinctrl_unhog_maps(struct pinctrl_dev *pctldev) 86static inline void pinmux_put(struct pinctrl *p)
87{
88}
89
90static inline int pinmux_enable(struct pinctrl *p)
91{
92}
93
94static inline void pinmux_disable(struct pinctrl *p)
95{
96}
97
98void pinmux_dbg_show(struct seq_file *s, struct pinctrl *p)
44{ 99{
45} 100}
46 101