diff options
Diffstat (limited to 'drivers/pinctrl/pinconf.h')
-rw-r--r-- | drivers/pinctrl/pinconf.h | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinconf.h b/drivers/pinctrl/pinconf.h index 0ded227661a5..54510de5e8c6 100644 --- a/drivers/pinctrl/pinconf.h +++ b/drivers/pinctrl/pinconf.h | |||
@@ -14,20 +14,26 @@ | |||
14 | #ifdef CONFIG_PINCONF | 14 | #ifdef CONFIG_PINCONF |
15 | 15 | ||
16 | int pinconf_check_ops(struct pinctrl_dev *pctldev); | 16 | int pinconf_check_ops(struct pinctrl_dev *pctldev); |
17 | |||
18 | int pinconf_validate_map(struct pinctrl_map const *map, int i); | 17 | int pinconf_validate_map(struct pinctrl_map const *map, int i); |
19 | |||
20 | int pinconf_map_to_setting(struct pinctrl_map const *map, | 18 | int pinconf_map_to_setting(struct pinctrl_map const *map, |
21 | struct pinctrl_setting *setting); | 19 | struct pinctrl_setting *setting); |
22 | void pinconf_free_setting(struct pinctrl_setting const *setting); | 20 | void pinconf_free_setting(struct pinctrl_setting const *setting); |
23 | int pinconf_apply_setting(struct pinctrl_setting const *setting); | 21 | int pinconf_apply_setting(struct pinctrl_setting const *setting); |
24 | |||
25 | void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map); | 22 | void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map); |
26 | void pinconf_show_setting(struct seq_file *s, | 23 | void pinconf_show_setting(struct seq_file *s, |
27 | struct pinctrl_setting const *setting); | 24 | struct pinctrl_setting const *setting); |
28 | void pinconf_init_device_debugfs(struct dentry *devroot, | 25 | void pinconf_init_device_debugfs(struct dentry *devroot, |
29 | struct pinctrl_dev *pctldev); | 26 | struct pinctrl_dev *pctldev); |
30 | 27 | ||
28 | /* | ||
29 | * You will only be interested in these if you're using PINCONF | ||
30 | * so don't supply any stubs for these. | ||
31 | */ | ||
32 | int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin, | ||
33 | unsigned long *config); | ||
34 | int pin_config_group_get(const char *dev_name, const char *pin_group, | ||
35 | unsigned long *config); | ||
36 | |||
31 | #else | 37 | #else |
32 | 38 | ||
33 | static inline int pinconf_check_ops(struct pinctrl_dev *pctldev) | 39 | static inline int pinconf_check_ops(struct pinctrl_dev *pctldev) |
@@ -71,3 +77,34 @@ static inline void pinconf_init_device_debugfs(struct dentry *devroot, | |||
71 | } | 77 | } |
72 | 78 | ||
73 | #endif | 79 | #endif |
80 | |||
81 | /* | ||
82 | * The following functions are available if the driver uses the generic | ||
83 | * pin config. | ||
84 | */ | ||
85 | |||
86 | #ifdef CONFIG_GENERIC_PINCONF | ||
87 | |||
88 | void pinconf_generic_dump_pin(struct pinctrl_dev *pctldev, | ||
89 | struct seq_file *s, unsigned pin); | ||
90 | |||
91 | void pinconf_generic_dump_group(struct pinctrl_dev *pctldev, | ||
92 | struct seq_file *s, const char *gname); | ||
93 | |||
94 | #else | ||
95 | |||
96 | static inline void pinconf_generic_dump_pin(struct pinctrl_dev *pctldev, | ||
97 | struct seq_file *s, | ||
98 | unsigned pin) | ||
99 | { | ||
100 | return; | ||
101 | } | ||
102 | |||
103 | static inline void pinconf_generic_dump_group(struct pinctrl_dev *pctldev, | ||
104 | struct seq_file *s, | ||
105 | const char *gname) | ||
106 | { | ||
107 | return; | ||
108 | } | ||
109 | |||
110 | #endif | ||