diff options
author | Bengt Jonsson <bengt.g.jonsson@stericsson.com> | 2011-10-04 10:56:48 +0200 |
---|---|---|
committer | Yvan FILLION <yvan.fillion@stericsson.com> | 2011-10-11 15:33:36 +0200 |
commit | 70bb59cdc42f53f02acd9f7fcdeb111729257b17 (patch) | |
tree | 838272d7ff6d6c298430bcf9fd59caa32f9cba0d /arch/arm | |
parent | ab10e9e7b56effea56f35658d182ec02e6c79e67 (diff) |
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.
ST-Ericsson ID: 282517
ST-Ericsson Linux next: -
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I77d03ffcc3273b0659dea3cffd8191b8c94b83d2
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33615
Reviewed-by: QABUILD
Reviewed-by: Yvan FILLION <yvan.fillion@stericsson.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 5 |
3 files changed, 11 insertions, 10 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 1b7e9f41cea..ebbd7d37bd9 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -143,8 +143,7 @@ static struct regulator_consumer_supply ab8500_sysclkreq_4_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 @@ -351,7 +350,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 = { @@ -487,3 +486,10 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { .consumer_supplies = ab8500_sysclkreq_4_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), +}; diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h index 94992158d96..0b94969604d 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.h +++ b/arch/arm/mach-ux500/board-mop500-regulators.h @@ -14,9 +14,7 @@ #include <linux/regulator/machine.h> #include <linux/regulator/ab8500.h> -extern struct ab8500_regulator_reg_init -ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS]; -extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS]; +extern struct ab8500_regulator_platform_data ab8500_regulator_plat_data; extern struct regulator_init_data tps61052_regulator; #endif diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 74f9824175e..63391034ab6 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -248,10 +248,7 @@ static struct platform_device u8500_modem_dev = { static struct ab8500_platform_data ab8500_platdata = { .irq_base = MOP500_AB8500_IRQ_BASE, - .regulator_reg_init = ab8500_regulator_reg_init, - .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init), - .regulator = ab8500_regulators, - .num_regulator = ARRAY_SIZE(ab8500_regulators), + .regulator = &ab8500_regulator_plat_data, #ifdef CONFIG_AB8500_DENC .denc = &ab8500_denc_pdata, #endif |