diff options
author | Vijaya Kumar Kilari <vijay.kilari@stericsson.com> | 2011-05-30 16:38:32 +0530 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:15:32 +0200 |
commit | 1b0ff28a0a2392c75f4b6f7cf9cc2ef680399c5f (patch) | |
tree | b652880a3a786e3457b33b3601b3a2ecae072faf /arch/arm/mach-ux500/board-u5500-regulators.c | |
parent | f89ebf3ef416dcdbe08e5ba97788a4587034b99c (diff) |
U5500: Add support for PLL and EPOD Power mgmt
PLL and EPOD support added in PRCMU driver
Regulator and clock framework driver updated
ST-Ericsson Linux next: -
ST-Ericsson ID: WP334772
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I134fe00df12788476e840a9c3f44dc0e39570fa9
Signed-off-by: Vijaya Kumar K <vijay.kilari@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23962
Reviewed-by: Mattias NILSSON <mattias.i.nilsson@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-u5500-regulators.c')
-rw-r--r-- | arch/arm/mach-ux500/board-u5500-regulators.c | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/board-u5500-regulators.c b/arch/arm/mach-ux500/board-u5500-regulators.c index d4f6022b9cc..ce9586aadfe 100644 --- a/arch/arm/mach-ux500/board-u5500-regulators.c +++ b/arch/arm/mach-ux500/board-u5500-regulators.c @@ -164,6 +164,37 @@ static struct regulator_consumer_supply u5500_vape_consumers[] = { REGULATOR_SUPPLY("v-uart", "uart3"), }; +static struct regulator_consumer_supply u5500_sga_consumers[] = { + REGULATOR_SUPPLY("debug", "reg-virt-consumer.0"), +}; + +static struct regulator_consumer_supply u5500_hva_consumers[] = { + REGULATOR_SUPPLY("debug", "reg-virt-consumer.1"), +}; + +static struct regulator_consumer_supply u5500_sia_consumers[] = { + REGULATOR_SUPPLY("debug", "reg-virt-consumer.2"), +}; + +static struct regulator_consumer_supply u5500_disp_consumers[] = { + REGULATOR_SUPPLY("debug", "reg-virt-consumer.3"), +}; + +static struct regulator_consumer_supply u5500_esram12_consumers[] = { + REGULATOR_SUPPLY("debug", "reg-virt-consumer.6"), +}; + +#define U5500_REGULATOR_SWITCH(lower, upper) \ +[U5500_REGULATOR_SWITCH_##upper] = (struct regulator_init_data []) { \ +{ \ + .constraints = { \ + .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ + }, \ + .consumer_supplies = u5500_##lower##_consumers, \ + .num_consumer_supplies = ARRAY_SIZE(u5500_##lower##_consumers),\ +} \ +} + static struct regulator_init_data * u5500_regulator_init_data[U5500_NUM_REGULATORS] __initdata = { [U5500_REGULATOR_VAPE] = (struct regulator_init_data []) { @@ -175,11 +206,28 @@ u5500_regulator_init_data[U5500_NUM_REGULATORS] __initdata = { .num_consumer_supplies = ARRAY_SIZE(u5500_vape_consumers), } }, + U5500_REGULATOR_SWITCH(sga, SGA), + U5500_REGULATOR_SWITCH(hva, HVA), + U5500_REGULATOR_SWITCH(sia, SIA), + U5500_REGULATOR_SWITCH(disp, DISP), + U5500_REGULATOR_SWITCH(esram12, ESRAM12), }; +static void __init u5500_regulators_init_debug(void) +{ + const char data[] = "debug"; + int i; + + for (i = 0; i < 10; i++) + platform_device_register_data(NULL, "reg-virt-consumer", i, + data, sizeof(data)); +} + void __init u5500_regulators_init(void) { + u5500_regulators_init_debug(); + platform_device_register_data(NULL, "u5500-regulators", -1, - u5500_regulator_init_data, - sizeof(u5500_regulator_init_data)); + u5500_regulator_init_data, + sizeof(u5500_regulator_init_data)); } |