0001
0002
0003
0004
0005
0006
0007 #ifndef __LINUX_OF_REG_H
0008 #define __LINUX_OF_REG_H
0009
0010 struct regulator_desc;
0011
0012 struct of_regulator_match {
0013 const char *name;
0014 void *driver_data;
0015 struct regulator_init_data *init_data;
0016 struct device_node *of_node;
0017 const struct regulator_desc *desc;
0018 };
0019
0020 #if defined(CONFIG_OF)
0021 extern struct regulator_init_data
0022 *of_get_regulator_init_data(struct device *dev,
0023 struct device_node *node,
0024 const struct regulator_desc *desc);
0025 extern int of_regulator_match(struct device *dev, struct device_node *node,
0026 struct of_regulator_match *matches,
0027 unsigned int num_matches);
0028 #else
0029 static inline struct regulator_init_data
0030 *of_get_regulator_init_data(struct device *dev,
0031 struct device_node *node,
0032 const struct regulator_desc *desc)
0033 {
0034 return NULL;
0035 }
0036
0037 static inline int of_regulator_match(struct device *dev,
0038 struct device_node *node,
0039 struct of_regulator_match *matches,
0040 unsigned int num_matches)
0041 {
0042 return 0;
0043 }
0044 #endif
0045
0046 #endif