diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-12-21 10:00:46 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-22 06:10:45 -0500 |
commit | 93bcb23b38f634e8fb4ddda0d3f4862fda5cedae (patch) | |
tree | 9f087497a7511022c8e740c3e16bb3703efc4fda /drivers/regulator/mc13xxx.h | |
parent | 3a5d03158d0174ae700e15b63eab2023f27aeb88 (diff) |
regulator: mc13892: add device tree probe support
It adds device tree probe support for mc13892-regulator driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/mc13xxx.h')
-rw-r--r-- | drivers/regulator/mc13xxx.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/regulator/mc13xxx.h b/drivers/regulator/mc13xxx.h index 75e383226a87..b3961c658b05 100644 --- a/drivers/regulator/mc13xxx.h +++ b/drivers/regulator/mc13xxx.h | |||
@@ -29,6 +29,7 @@ struct mc13xxx_regulator_priv { | |||
29 | struct mc13xxx *mc13xxx; | 29 | struct mc13xxx *mc13xxx; |
30 | u32 powermisc_pwgt_state; | 30 | u32 powermisc_pwgt_state; |
31 | struct mc13xxx_regulator *mc13xxx_regulators; | 31 | struct mc13xxx_regulator *mc13xxx_regulators; |
32 | int num_regulators; | ||
32 | struct regulator_dev *regulators[]; | 33 | struct regulator_dev *regulators[]; |
33 | }; | 34 | }; |
34 | 35 | ||
@@ -42,6 +43,25 @@ extern int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, | |||
42 | int min_uV, int max_uV, unsigned *selector); | 43 | int min_uV, int max_uV, unsigned *selector); |
43 | extern int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev); | 44 | extern int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev); |
44 | 45 | ||
46 | #ifdef CONFIG_OF | ||
47 | extern int mc13xxx_get_num_regulators_dt(struct platform_device *pdev); | ||
48 | extern struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt( | ||
49 | struct platform_device *pdev, struct mc13xxx_regulator *regulators, | ||
50 | int num_regulators); | ||
51 | #else | ||
52 | static inline int mc13xxx_get_num_regulators_dt(struct platform_device *pdev) | ||
53 | { | ||
54 | return -ENODEV; | ||
55 | } | ||
56 | |||
57 | static inline struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt( | ||
58 | struct platform_device *pdev, struct mc13xxx_regulator *regulators, | ||
59 | int num_regulators) | ||
60 | { | ||
61 | return NULL; | ||
62 | } | ||
63 | #endif | ||
64 | |||
45 | extern struct regulator_ops mc13xxx_regulator_ops; | 65 | extern struct regulator_ops mc13xxx_regulator_ops; |
46 | extern struct regulator_ops mc13xxx_fixed_regulator_ops; | 66 | extern struct regulator_ops mc13xxx_fixed_regulator_ops; |
47 | 67 | ||