aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>2014-11-10 08:43:53 -0500
committerMark Brown <broonie@kernel.org>2014-11-26 13:58:14 -0500
commit072e78b12bf5182a3e2e460388214a291023ef1c (patch)
treedea7a9970709db752d8b998adcc5615e844ddb87 /include/linux/regulator
parent87e1e0f29f703e91c54e81f05d831432ec659dde (diff)
regulator: of: Add regulator desc param to of_get_regulator_init_data()
The of_get_regulator_init_data() function is used to extract the regulator init_data but information on how to extract certain data is defined in the static regulator descriptor (e.g: how to map the hardware operating modes). Add a const struct regulator_desc * parameter to the function signature so the parsing logic could use the information in the struct regulator_desc. of_get_regulator_init_data() relies on of_get_regulation_constraints() to actually extract the init_data so it has to pass the struct regulator_desc but that is modified on a later patch. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/of_regulator.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/regulator/of_regulator.h b/include/linux/regulator/of_regulator.h
index f9217965aaa3..8d1d136c0fb9 100644
--- a/include/linux/regulator/of_regulator.h
+++ b/include/linux/regulator/of_regulator.h
@@ -6,6 +6,8 @@
6#ifndef __LINUX_OF_REG_H 6#ifndef __LINUX_OF_REG_H
7#define __LINUX_OF_REG_H 7#define __LINUX_OF_REG_H
8 8
9struct regulator_desc;
10
9struct of_regulator_match { 11struct of_regulator_match {
10 const char *name; 12 const char *name;
11 void *driver_data; 13 void *driver_data;
@@ -16,14 +18,16 @@ struct of_regulator_match {
16#if defined(CONFIG_OF) 18#if defined(CONFIG_OF)
17extern struct regulator_init_data 19extern struct regulator_init_data
18 *of_get_regulator_init_data(struct device *dev, 20 *of_get_regulator_init_data(struct device *dev,
19 struct device_node *node); 21 struct device_node *node,
22 const struct regulator_desc *desc);
20extern int of_regulator_match(struct device *dev, struct device_node *node, 23extern int of_regulator_match(struct device *dev, struct device_node *node,
21 struct of_regulator_match *matches, 24 struct of_regulator_match *matches,
22 unsigned int num_matches); 25 unsigned int num_matches);
23#else 26#else
24static inline struct regulator_init_data 27static inline struct regulator_init_data
25 *of_get_regulator_init_data(struct device *dev, 28 *of_get_regulator_init_data(struct device *dev,
26 struct device_node *node) 29 struct device_node *node,
30 const struct regulator_desc *desc)
27{ 31{
28 return NULL; 32 return NULL;
29} 33}