From ff062b5640160f61a61e862c028f8b4585ccb443 Mon Sep 17 00:00:00 2001 From: Bengt Jonsson Date: Wed, 22 Jun 2011 18:59:11 +0200 Subject: 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 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25743 Reviewed-by: QATEST Reviewed-by: Jonas ABERG --- drivers/regulator/ab8500-debug.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3