blob: f9217965aaa38a8f585eadc712eac62257e91fae [file] [log] [blame]
Rajendra Nayak8f446e62011-11-18 16:47:17 +05301/*
2 * OpenFirmware regulator support routines
3 *
4 */
5
6#ifndef __LINUX_OF_REG_H
7#define __LINUX_OF_REG_H
8
Thierry Reding1c8fa582012-04-26 16:52:20 +02009struct of_regulator_match {
10 const char *name;
11 void *driver_data;
12 struct regulator_init_data *init_data;
13 struct device_node *of_node;
14};
15
Rajendra Nayak8f446e62011-11-18 16:47:17 +053016#if defined(CONFIG_OF)
17extern struct regulator_init_data
Shawn Guod9a861c2011-12-01 17:21:06 +080018 *of_get_regulator_init_data(struct device *dev,
19 struct device_node *node);
Thierry Reding1c8fa582012-04-26 16:52:20 +020020extern int of_regulator_match(struct device *dev, struct device_node *node,
21 struct of_regulator_match *matches,
22 unsigned int num_matches);
Rajendra Nayak8f446e62011-11-18 16:47:17 +053023#else
24static inline struct regulator_init_data
Shawn Guod9a861c2011-12-01 17:21:06 +080025 *of_get_regulator_init_data(struct device *dev,
26 struct device_node *node)
Rajendra Nayak8f446e62011-11-18 16:47:17 +053027{
28 return NULL;
29}
Thierry Reding1c8fa582012-04-26 16:52:20 +020030
31static inline int of_regulator_match(struct device *dev,
32 struct device_node *node,
33 struct of_regulator_match *matches,
34 unsigned int num_matches)
35{
36 return 0;
37}
Rajendra Nayak8f446e62011-11-18 16:47:17 +053038#endif /* CONFIG_OF */
39
40#endif /* __LINUX_OF_REG_H */