2011-11-18 19:17:17 +08:00
|
|
|
/*
|
|
|
|
* OpenFirmware regulator support routines
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LINUX_OF_REG_H
|
|
|
|
#define __LINUX_OF_REG_H
|
|
|
|
|
2012-04-26 22:52:20 +08:00
|
|
|
struct of_regulator_match {
|
|
|
|
const char *name;
|
|
|
|
void *driver_data;
|
|
|
|
struct regulator_init_data *init_data;
|
|
|
|
struct device_node *of_node;
|
|
|
|
};
|
|
|
|
|
2011-11-18 19:17:17 +08:00
|
|
|
#if defined(CONFIG_OF)
|
|
|
|
extern struct regulator_init_data
|
2011-12-01 17:21:06 +08:00
|
|
|
*of_get_regulator_init_data(struct device *dev,
|
|
|
|
struct device_node *node);
|
2012-04-26 22:52:20 +08:00
|
|
|
extern int of_regulator_match(struct device *dev, struct device_node *node,
|
|
|
|
struct of_regulator_match *matches,
|
|
|
|
unsigned int num_matches);
|
2011-11-18 19:17:17 +08:00
|
|
|
#else
|
|
|
|
static inline struct regulator_init_data
|
2011-12-01 17:21:06 +08:00
|
|
|
*of_get_regulator_init_data(struct device *dev,
|
|
|
|
struct device_node *node)
|
2011-11-18 19:17:17 +08:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
2012-04-26 22:52:20 +08:00
|
|
|
|
|
|
|
static inline int of_regulator_match(struct device *dev,
|
|
|
|
struct device_node *node,
|
|
|
|
struct of_regulator_match *matches,
|
|
|
|
unsigned int num_matches)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2011-11-18 19:17:17 +08:00
|
|
|
#endif /* CONFIG_OF */
|
|
|
|
|
|
|
|
#endif /* __LINUX_OF_REG_H */
|