From a30e3b5ccce72ae4697a377ccbbb7028384d6c28 Mon Sep 17 00:00:00 2001 From: Andreas Blaesius Date: Sun, 8 May 2016 23:12:52 +0200 Subject: Partially revert "espresso: pmic: update configuration" Add back espresso/espresso10 distinction to fix battery drain - don't revert the remove of unused bestbuy variant specific changes - don't revert the remove of unused REGULATOR_SUPPLY definitions - don't revert espresso10 specific .num_consumer_supplies Change-Id: I1ba0b2d0bcdfae66dc58eb1146f77db8bbbe7892 --- arch/arm/mach-omap2/board-espresso-pmic.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap2/board-espresso-pmic.c b/arch/arm/mach-omap2/board-espresso-pmic.c index fcea0ac..13a3136e 100644 --- a/arch/arm/mach-omap2/board-espresso-pmic.c +++ b/arch/arm/mach-omap2/board-espresso-pmic.c @@ -164,8 +164,9 @@ static struct regulator_init_data espresso_vaux1 = { | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, + .always_on = true, .state_mem = { - .disabled = true, + .enabled = true, }, }, }; @@ -186,9 +187,6 @@ static struct regulator_init_data espresso_vaux2 = { .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, - .state_mem = { - .enabled = true, - }, }, .num_consumer_supplies = ARRAY_SIZE(espresso_vaux2_supplies), .consumer_supplies = espresso_vaux2_supplies, @@ -239,7 +237,7 @@ static struct regulator_init_data espresso_vana = { | REGULATOR_CHANGE_STATUS, .always_on = true, .state_mem = { - .disabled = true, + .enabled = true, }, }, }; @@ -458,13 +456,9 @@ static struct regulator_init_data espresso_ldo5 = { .min_uV = 1800000, .max_uV = 1800000, .apply_uV = true, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, + .valid_modes_mask = REGULATOR_MODE_NORMAL, .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, - .state_mem = { - .disabled = true, - }, }, .num_consumer_supplies = ARRAY_SIZE(espresso_vdd_io_1V8_supplies), .consumer_supplies = espresso_vdd_io_1V8_supplies, @@ -586,8 +580,20 @@ void __init omap4_espresso_pmic_init(void) */ regulator_has_full_constraints(); - if (board_is_espresso10()) + if (board_is_espresso10()) { + espresso_vana.constraints.state_mem.enabled = false; + + espresso_vaux1.constraints.state_mem.enabled = false; + + espresso_vaux2.constraints.always_on = true; + + espresso_vusim.constraints.state_mem.enabled = false; + + espresso_ldo5.constraints.valid_modes_mask |= REGULATOR_MODE_STANDBY; + espresso_ldo5.constraints.always_on = true, + espresso_twl6032_pdata.rtc = &espresso_rtc; + } espresso_audio_init(); -- cgit v1.1