summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/board-mop500-regulators.c
diff options
context:
space:
mode:
authorBengt Jonsson <bengt.g.jonsson@stericsson.com>2013-03-21 15:59:03 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-22 12:03:17 +0100
commit732805a563617aafc7405409c03182afafb3943b (patch)
tree8ecd2fefdef5f6802f8a28b60dfb93f26f0473a7 /arch/arm/mach-ux500/board-mop500-regulators.c
parent33bc8f46a8ee3fc1836def9713933435b7ff0b90 (diff)
regulator: ab8500: Separate regulator and MFD platform data
The ab8500 MFD should not have knowledge about regulator- specific platform data like number of regulators and regulator registers. As the regulator platform data is about to grow with external regulators, this information is moved to a new structure provided by the regulator driver. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Yvan FILLION <yvan.fillion@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-regulators.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index a8141e3e8ca1..0fd84d42e1ec 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -122,8 +122,7 @@ static struct regulator_consumer_supply ab8500_vana_consumers[] = {
};
/* ab8500 regulator register initialization */
-struct ab8500_regulator_reg_init
-ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
+static struct ab8500_regulator_reg_init ab8500_reg_init[] = {
/*
* VanaRequestCtrl = HP/LP depending on VxRequest
* VpllRequestCtrl = HP/LP depending on VxRequest
@@ -314,7 +313,7 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
};
/* AB8500 regulators */
-struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
+static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supplies to the display/camera */
[AB8500_LDO_AUX1] = {
.constraints = {
@@ -423,3 +422,10 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
.consumer_supplies = ab8500_vana_consumers,
},
};
+
+struct ab8500_regulator_platform_data ab8500_regulator_plat_data = {
+ .reg_init = ab8500_reg_init,
+ .num_reg_init = ARRAY_SIZE(ab8500_reg_init),
+ .regulator = ab8500_regulators,
+ .num_regulator = ARRAY_SIZE(ab8500_regulators),
+};