Commit | Line | Data |
---|---|---|
8f446e6f RN |
1 | /* |
2 | * OpenFirmware regulator support routines | |
3 | * | |
4 | */ | |
5 | ||
6 | #ifndef __LINUX_OF_REG_H | |
7 | #define __LINUX_OF_REG_H | |
8 | ||
072e78b1 JMC |
9 | struct regulator_desc; |
10 | ||
1c8fa58f TR |
11 | struct of_regulator_match { |
12 | const char *name; | |
13 | void *driver_data; | |
14 | struct regulator_init_data *init_data; | |
15 | struct device_node *of_node; | |
75d6b2fa | 16 | const struct regulator_desc *desc; |
1c8fa58f TR |
17 | }; |
18 | ||
8f446e6f RN |
19 | #if defined(CONFIG_OF) |
20 | extern struct regulator_init_data | |
d9a861cc | 21 | *of_get_regulator_init_data(struct device *dev, |
072e78b1 JMC |
22 | struct device_node *node, |
23 | const struct regulator_desc *desc); | |
1c8fa58f TR |
24 | extern int of_regulator_match(struct device *dev, struct device_node *node, |
25 | struct of_regulator_match *matches, | |
26 | unsigned int num_matches); | |
8f446e6f RN |
27 | #else |
28 | static inline struct regulator_init_data | |
d9a861cc | 29 | *of_get_regulator_init_data(struct device *dev, |
072e78b1 JMC |
30 | struct device_node *node, |
31 | const struct regulator_desc *desc) | |
8f446e6f RN |
32 | { |
33 | return NULL; | |
34 | } | |
1c8fa58f TR |
35 | |
36 | static inline int of_regulator_match(struct device *dev, | |
37 | struct device_node *node, | |
38 | struct of_regulator_match *matches, | |
39 | unsigned int num_matches) | |
40 | { | |
41 | return 0; | |
42 | } | |
8f446e6f RN |
43 | #endif /* CONFIG_OF */ |
44 | ||
45 | #endif /* __LINUX_OF_REG_H */ |