1 /* SPDX-License-Identifier: GPL-2.0 */
3 * OpenFirmware regulator support routines
7 #ifndef __LINUX_OF_REG_H
8 #define __LINUX_OF_REG_H
10 struct regulator_desc
;
12 struct of_regulator_match
{
15 struct regulator_init_data
*init_data
;
16 struct device_node
*of_node
;
17 const struct regulator_desc
*desc
;
20 #if defined(CONFIG_OF)
21 extern struct regulator_init_data
22 *of_get_regulator_init_data(struct device
*dev
,
23 struct device_node
*node
,
24 const struct regulator_desc
*desc
);
25 extern int of_regulator_match(struct device
*dev
, struct device_node
*node
,
26 struct of_regulator_match
*matches
,
27 unsigned int num_matches
);
29 static inline struct regulator_init_data
30 *of_get_regulator_init_data(struct device
*dev
,
31 struct device_node
*node
,
32 const struct regulator_desc
*desc
)
37 static inline int of_regulator_match(struct device
*dev
,
38 struct device_node
*node
,
39 struct of_regulator_match
*matches
,
40 unsigned int num_matches
)
44 #endif /* CONFIG_OF */
46 #endif /* __LINUX_OF_REG_H */