aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBengt Jonsson <bengt.g.jonsson@stericsson.com>2011-06-22 18:59:11 +0200
committersaid m bagheri <ebgheri@steludxu2848.(none)>2011-06-29 10:30:38 +0200
commitff062b5640160f61a61e862c028f8b4585ccb443 (patch)
tree908b9ba6760cd9940f273efdb1dfbcde18ecfc4e
parent8f0470f17a88f8838b3e6c6b5028116e9f3baeed (diff)
regulators: Remove force of VextSupplies on AB 3.x
This is a temporary fix. It disables forcing of the VextSupply regulators on AB 3.x. ST-Ericsson Linux next: not to be mainlined ST-Ericsson ID: 348665 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I71d846986497faf600ac948387f83dc01a7348e6 Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25743 Reviewed-by: QATEST Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r--drivers/regulator/ab8500-debug.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/regulator/ab8500-debug.c b/drivers/regulator/ab8500-debug.c
index b03f7b1b1fa..4aef00be24c 100644
--- a/drivers/regulator/ab8500-debug.c
+++ b/drivers/regulator/ab8500-debug.c
@@ -1720,7 +1720,7 @@ static struct dentry *ab8500_regulator_suspend_force_file;
static int __devinit ab8500_regulator_debug_probe(struct platform_device *plf)
{
void __iomem *boot_info_backupram;
- int ret;
+ int ret, i;
/* setup dev pointers */
dev = &plf->dev;
@@ -1731,6 +1731,21 @@ static int __devinit ab8500_regulator_debug_probe(struct platform_device *plf)
if (ret < 0)
dev_err(&plf->dev, "Failed to record init state.\n");
+ /* remove force of external regulators on AB8500 3.0 */
+ if (abx500_get_chip_id(&pdev->dev) >= 0x30) {
+ /*
+ * find ExtSupplyRegu register (bank 0x04, addr 0x08)
+ * and reset mask and value
+ */
+ for (i = 0; i < ARRAY_SIZE(ab8500_force_reg); i++) {
+ if (ab8500_force_reg[i].bank == 0x04 &&
+ ab8500_force_reg[i].addr == 0x08) {
+ ab8500_force_reg[i].mask = 0x00;
+ ab8500_force_reg[i].val = 0x00;
+ }
+ }
+ }
+
/* make suspend-force default if board profile is v5x-power */
boot_info_backupram = ioremap(BOOT_INFO_BACKUPRAM1, 0x4);