This source file includes following definitions.
- device_node_to_regmap
- syscon_node_to_regmap
- syscon_regmap_lookup_by_compatible
- syscon_regmap_lookup_by_phandle
1
2
3
4
5
6
7
8
9
10
11 #ifndef __LINUX_MFD_SYSCON_H__
12 #define __LINUX_MFD_SYSCON_H__
13
14 #include <linux/err.h>
15 #include <linux/errno.h>
16
17 struct device_node;
18
19 #ifdef CONFIG_MFD_SYSCON
20 extern struct regmap *device_node_to_regmap(struct device_node *np);
21 extern struct regmap *syscon_node_to_regmap(struct device_node *np);
22 extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
23 extern struct regmap *syscon_regmap_lookup_by_phandle(
24 struct device_node *np,
25 const char *property);
26 #else
27 static inline struct regmap *device_node_to_regmap(struct device_node *np)
28 {
29 return ERR_PTR(-ENOTSUPP);
30 }
31
32 static inline struct regmap *syscon_node_to_regmap(struct device_node *np)
33 {
34 return ERR_PTR(-ENOTSUPP);
35 }
36
37 static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
38 {
39 return ERR_PTR(-ENOTSUPP);
40 }
41
42 static inline struct regmap *syscon_regmap_lookup_by_phandle(
43 struct device_node *np,
44 const char *property)
45 {
46 return ERR_PTR(-ENOTSUPP);
47 }
48 #endif
49
50 #endif