aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pinctrl/pinconf.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-03-26 11:18:44 -0400
committerIngo Molnar <mingo@kernel.org>2012-03-26 11:19:03 -0400
commit7fd52392c56361a40f0c630a82b36b95ca31eac6 (patch)
tree14091de24c6b28ea4cae9826f98aeedb7be091f5 /include/linux/pinctrl/pinconf.h
parentb01c3a0010aabadf745f3e7fdb9cab682e0a28a2 (diff)
parente22057c8599373e5caef0bc42bdb95d2a361ab0d (diff)
Merge branch 'linus' into perf/urgent
Merge reason: we need to fix a non-trivial merge conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/pinctrl/pinconf.h')
-rw-r--r--include/linux/pinctrl/pinconf.h44
1 files changed, 5 insertions, 39 deletions
diff --git a/include/linux/pinctrl/pinconf.h b/include/linux/pinctrl/pinconf.h
index 477922cf043a..ec431f03362d 100644
--- a/include/linux/pinctrl/pinconf.h
+++ b/include/linux/pinctrl/pinconf.h
@@ -20,6 +20,8 @@ struct seq_file;
20/** 20/**
21 * struct pinconf_ops - pin config operations, to be implemented by 21 * struct pinconf_ops - pin config operations, to be implemented by
22 * pin configuration capable drivers. 22 * pin configuration capable drivers.
23 * @is_generic: for pin controllers that want to use the generic interface,
24 * this flag tells the framework that it's generic.
23 * @pin_config_get: get the config of a certain pin, if the requested config 25 * @pin_config_get: get the config of a certain pin, if the requested config
24 * is not available on this controller this should return -ENOTSUPP 26 * is not available on this controller this should return -ENOTSUPP
25 * and if it is available but disabled it should return -EINVAL 27 * and if it is available but disabled it should return -EINVAL
@@ -33,6 +35,9 @@ struct seq_file;
33 * per-device info for a certain group in debugfs 35 * per-device info for a certain group in debugfs
34 */ 36 */
35struct pinconf_ops { 37struct pinconf_ops {
38#ifdef CONFIG_GENERIC_PINCONF
39 bool is_generic;
40#endif
36 int (*pin_config_get) (struct pinctrl_dev *pctldev, 41 int (*pin_config_get) (struct pinctrl_dev *pctldev,
37 unsigned pin, 42 unsigned pin,
38 unsigned long *config); 43 unsigned long *config);
@@ -53,45 +58,6 @@ struct pinconf_ops {
53 unsigned selector); 58 unsigned selector);
54}; 59};
55 60
56extern int pin_config_get(const char *dev_name, const char *name,
57 unsigned long *config);
58extern int pin_config_set(const char *dev_name, const char *name,
59 unsigned long config);
60extern int pin_config_group_get(const char *dev_name,
61 const char *pin_group,
62 unsigned long *config);
63extern int pin_config_group_set(const char *dev_name,
64 const char *pin_group,
65 unsigned long config);
66
67#else
68
69static inline int pin_config_get(const char *dev_name, const char *name,
70 unsigned long *config)
71{
72 return 0;
73}
74
75static inline int pin_config_set(const char *dev_name, const char *name,
76 unsigned long config)
77{
78 return 0;
79}
80
81static inline int pin_config_group_get(const char *dev_name,
82 const char *pin_group,
83 unsigned long *config)
84{
85 return 0;
86}
87
88static inline int pin_config_group_set(const char *dev_name,
89 const char *pin_group,
90 unsigned long config)
91{
92 return 0;
93}
94
95#endif 61#endif
96 62
97#endif /* __LINUX_PINCTRL_PINCONF_H */ 63#endif /* __LINUX_PINCTRL_PINCONF_H */