diff options
author | Bengt Jonsson <bengt.g.jonsson@stericsson.com> | 2011-11-06 15:09:33 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 10:59:19 +0200 |
commit | 3e63cd45ec9ccb276a95ab7951947ed5874d7edd (patch) | |
tree | b161580598a9834e11661a8ac8f2794b0cf2954d /drivers/regulator | |
parent | d3be611d7c9f400ac738a0e1a0103237a1fdf2c7 (diff) |
regulator: ab8500-ext: Add VextSupply2 regulator
Remove suspend-force settings of VextSupply2 and
add VextSupply2 in the external regulator driver.
ST-Ericsson Linux next: -
ST-Ericsson ID: 374223
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: If770703949343a4bf01badd33748ebc52476dcc0
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/37703
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/ab8500-debug.c | 56 | ||||
-rw-r--r-- | drivers/regulator/ab8500-ext.c | 18 |
2 files changed, 19 insertions, 55 deletions
diff --git a/drivers/regulator/ab8500-debug.c b/drivers/regulator/ab8500-debug.c index 50789258654..b2e1628e52d 100644 --- a/drivers/regulator/ab8500-debug.c +++ b/drivers/regulator/ab8500-debug.c @@ -1465,30 +1465,6 @@ static struct ab8500_force_reg ab8500_force_reg[] = { }, { /* - * ReguSysClkReq1HPValid2 - * OTP: 0x03, HSI: 0x40, suspend: 0x60/0x70 (value/mask) - * [ 5] VextSupply2SysClkReq1HPValid = Vext2 set by SysClkReq1 - */ - .name = "ReguSysClkReq1HPValid2", - .bank = 0x03, - .addr = 0x08, - .mask = 0x20, /* test and compare with 0x7f */ - .val = 0x20, - }, - { - /* - * ReguRequestCtrl3 - * OTP: 0x00, HSI: 0x00, suspend: 0x05/0x0f (value/mask) - * [1:0] VExtSupply2RequestCtrl[1:0] = VExt2 set in HP/OFF mode - */ - .name = "ReguRequestCtrl3", - .bank = 0x03, - .addr = 0x05, - .mask = 0x03, /* test and compare with 0xff */ - .val = 0x01, - }, - { - /* * VsimSysClkCtrl * OTP: 0x01, HSI: 0x21, suspend: 0x01/0xff (value/mask) * [ 7] VsimSysClkReq8Valid = no connection @@ -1523,18 +1499,6 @@ static struct ab8500_force_reg ab8500_force_reg[] = { }, { /* - * ExtSupplyRegu (HSI: 0x2a on v2-v40?) - * OTP: 0x15, HSI: 0x28, suspend: 0x28/0x3f (value/mask) - * [3:2] VExtSupply2Regu[1:0] = 10 = Vext2 in HW control - */ - .name = "ExtSupplyRegu", - .bank = 0x04, - .addr = 0x08, - .mask = 0x0c, - .val = 0x08, - }, - { - /* * TVoutCtrl * OTP: N/A, HSI: N/A, suspend: 0x00/0x03 (value/mask) * [ 2] PlugTvOn = plug/unplug detection disabled @@ -1720,7 +1684,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, i; + int ret; /* setup dev pointers */ dev = &plf->dev; @@ -1731,24 +1695,6 @@ 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 if AB8500 3.0 and DB8500 v2.2 */ - if ((abx500_get_chip_id(&pdev->dev) >= 0x30) && cpu_is_u8500v22()) { - /* - * find ExtSupplyRegu register (bank 0x04, addr 0x08) - * and update value (Vext2 off). - */ - for (i = 0; i < ARRAY_SIZE(ab8500_force_reg); i++) { - if (ab8500_force_reg[i].bank == 0x04 && - ab8500_force_reg[i].addr == 0x08) { - u8 val, val_mask = 0x0c; - - val = ab8500_force_reg[i].val; - val = (val & ~val_mask) | (0x00 & val_mask); - ab8500_force_reg[i].val = val; - } - } - } - /* make suspend-force default if board profile is v5x-power */ boot_info_backupram = ioremap(BOOT_INFO_BACKUPRAM1, 0x4); diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c index f6ce6623460..f5971de1dc5 100644 --- a/drivers/regulator/ab8500-ext.c +++ b/drivers/regulator/ab8500-ext.c @@ -318,6 +318,24 @@ static struct ab8500_ext_regulator_info .update_val_lp = 0x03, .update_val_hw = 0x02, }, + [AB8500_EXT_SUPPLY2] = { + .desc = { + .name = "VEXTSUPPLY2", + .ops = &ab8500_ext_regulator_ops, + .type = REGULATOR_VOLTAGE, + .id = AB8500_EXT_SUPPLY2, + .owner = THIS_MODULE, + .n_voltages = 1, + }, + .fixed_uV = 1360000, + .update_bank = 0x04, + .update_reg = 0x08, + .update_mask = 0x0c, + .update_val = 0x04, + .update_val_hp = 0x04, + .update_val_lp = 0x0c, + .update_val_hw = 0x08, + }, [AB8500_EXT_SUPPLY3] = { .desc = { .name = "VEXTSUPPLY3", |