From: Rajendra Nayak Date: Wed, 17 Feb 2010 15:24:15 +0000 (+0530) Subject: twl6030: regulator: Configure STATE register instead of REMAP X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2ebcf63245b4496808712ed884f6a330d73bc807;p=openwrt%2Fstaging%2Fblogic.git twl6030: regulator: Configure STATE register instead of REMAP This is no REMAP register on twl6030, instead there is a STATE register to drive a resource to a given state. The state register can be used to specify what state the resource should enter when its associated with a GRP. Register Bit field description is as below. The patch programmes the corresponding STATE registers for all LDO's to turn ON when assocaited with GRP_P1. STATE REG: Bit7 |Bit6 |Bit5 |Bit4 |Bit3 |Bit2 |Bit1 |Bit0 P3_GRP |P2_GRP |P1_GRP |RES |RES |RES |State1 |State0 State can be specified as below 00: OFF 01: ON 10: OFF 11: SLEEP Signed-off-by: Rajendra Nayak Cc: Liam Girdwood Cc: Samuel Ortiz Cc: Mark Brown Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 7e674859bd59..5f394bb8701f 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -519,16 +519,16 @@ static struct twlreg_info twl_regs[] = { /* 6030 REG with base as PMC Slave Misc : 0x0030 */ /* Turnon-delay and remap configuration values for 6030 are not verified since the specification is not public */ - TWL6030_ADJUSTABLE_LDO(VAUX1_6030, 0x54, 1, 0, 0x08), - TWL6030_ADJUSTABLE_LDO(VAUX2_6030, 0x58, 2, 0, 0x08), - TWL6030_ADJUSTABLE_LDO(VAUX3_6030, 0x5c, 3, 0, 0x08), - TWL6030_ADJUSTABLE_LDO(VMMC, 0x68, 4, 0, 0x08), - TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 5, 0, 0x08), - TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 7, 0, 0x08), - TWL6030_FIXED_LDO(VANA, 0x50, 2100, 15, 0, 0x08), - TWL6030_FIXED_LDO(VCXIO, 0x60, 1800, 16, 0, 0x08), - TWL6030_FIXED_LDO(VDAC, 0x64, 1800, 17, 0, 0x08), - TWL6030_FIXED_LDO(VUSB, 0x70, 3300, 18, 0, 0x08) + TWL6030_ADJUSTABLE_LDO(VAUX1_6030, 0x54, 1, 0, 0x21), + TWL6030_ADJUSTABLE_LDO(VAUX2_6030, 0x58, 2, 0, 0x21), + TWL6030_ADJUSTABLE_LDO(VAUX3_6030, 0x5c, 3, 0, 0x21), + TWL6030_ADJUSTABLE_LDO(VMMC, 0x68, 4, 0, 0x21), + TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 5, 0, 0x21), + TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 7, 0, 0x21), + TWL6030_FIXED_LDO(VANA, 0x50, 2100, 15, 0, 0x21), + TWL6030_FIXED_LDO(VCXIO, 0x60, 1800, 16, 0, 0x21), + TWL6030_FIXED_LDO(VDAC, 0x64, 1800, 17, 0, 0x21), + TWL6030_FIXED_LDO(VUSB, 0x70, 3300, 18, 0, 0x21) }; static int twlreg_probe(struct platform_device *pdev)