* [PATCHv2 0/3] for-next: Add all twl4030 regulators to RegFW
@ 2009-11-25 10:04 Juha Keski-Saari
2009-11-25 10:04 ` [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info Juha Keski-Saari
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Juha Keski-Saari @ 2009-11-25 10:04 UTC (permalink / raw)
To: lrg, broonie, dbrownell, linux-kernel
Cc: peter.de-schrijver, eduardo.valentin, ext-juha.1.keski-saari
Hello Liam,
This series is a revision of an earlier patch which was sent before.
The previous patch was split and now these changes are against voltage-2.6
tree, branch for-next.
There are two new modification. So now this series contains:
- Add all twl4030 regulators to the RegFW and
- make sure the REMAP configuration of each regulator is as after reset.
- Also defines critical regulators as always-on since it is not feasible
to allow them to be disabled in a case where the RegFW is used
These are only modifications on the twl4030 regulator driver. Changes to
the mfd driver will be sent separately
BR,
Juha Keski-Saari (3):
twl4030-regulator: Add all TWL regulators to twreg_info
Reset REMAP configuration in regulator probe
Define critical regulators as always_on
drivers/regulator/twl4030-regulator.c | 48 +++++++++++++++++++++++---------
1 files changed, 34 insertions(+), 14 deletions(-)
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info 2009-11-25 10:04 [PATCHv2 0/3] for-next: Add all twl4030 regulators to RegFW Juha Keski-Saari @ 2009-11-25 10:04 ` Juha Keski-Saari 2009-11-25 13:38 ` Juha Keski-Saari 2009-11-25 10:04 ` [PATCHv2 2/3] Reset REMAP configuration in regulator probe Juha Keski-Saari 2009-11-25 10:04 ` [PATCHv2 3/3] Define critical regulators as always_on Juha Keski-Saari 2 siblings, 1 reply; 13+ messages in thread From: Juha Keski-Saari @ 2009-11-25 10:04 UTC (permalink / raw) To: lrg, broonie, dbrownell, linux-kernel Cc: peter.de-schrijver, eduardo.valentin, ext-juha.1.keski-saari Define all twl4030 regulators in the twlreg_info table, along with appropriate VSEL tables for adjustable regulators Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> --- drivers/regulator/twl4030-regulator.c | 31 +++++++++++++++++-------------- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c index 9365140..75da6af 100644 --- a/drivers/regulator/twl4030-regulator.c +++ b/drivers/regulator/twl4030-regulator.c @@ -260,7 +260,18 @@ static const u16 VSIM_VSEL_table[] = { static const u16 VDAC_VSEL_table[] = { 1200, 1300, 1800, 1800, }; - +static const u16 VDD1_VSEL_table[] = { + 800, 1450, +}; +static const u16 VDD2_VSEL_table[] = { + 800, 1450, 1500, +}; +static const u16 VIO_VSEL_table[] = { + 1800, 1850, +}; +static const u16 VINTANA2_VSEL_table[] = { + 2500, 2750, +}; static int twl4030ldo_list_voltage(struct regulator_dev *rdev, unsigned index) { @@ -390,27 +401,19 @@ static struct regulator_ops twl4030fixed_ops = { * software control over them after boot. */ static struct twlreg_info twl4030_regs[] = { - TWL_ADJUSTABLE_LDO(VAUX1, 0x17, 1), - TWL_ADJUSTABLE_LDO(VAUX2_4030, 0x1b, 2), - TWL_ADJUSTABLE_LDO(VAUX2, 0x1b, 2), - TWL_ADJUSTABLE_LDO(VAUX3, 0x1f, 3), TWL_ADJUSTABLE_LDO(VAUX4, 0x23, 4), TWL_ADJUSTABLE_LDO(VMMC1, 0x27, 5), TWL_ADJUSTABLE_LDO(VMMC2, 0x2b, 6), - /* TWL_ADJUSTABLE_LDO(VPLL1, 0x2f, 7), - */ TWL_ADJUSTABLE_LDO(VPLL2, 0x33, 8), TWL_ADJUSTABLE_LDO(VSIM, 0x37, 9), TWL_ADJUSTABLE_LDO(VDAC, 0x3b, 10), - /* - TWL_ADJUSTABLE_LDO(VINTANA1, 0x3f, 11), + TWL_FIXED_LDO(VINTANA1, 0x3f, 1500, 11), TWL_ADJUSTABLE_LDO(VINTANA2, 0x43, 12), - TWL_ADJUSTABLE_LDO(VINTDIG, 0x47, 13), - TWL_SMPS(VIO, 0x4b, 14), - TWL_SMPS(VDD1, 0x55, 15), - TWL_SMPS(VDD2, 0x63, 16), - */ + TWL_FIXED_LDO(VINTDIG, 0x47, 1500, 13), + TWL_ADJUSTABLE_LDO(VIO, 0x4b, 14), + TWL_ADJUSTABLE_LDO(VDD1, 0x55, 15), + TWL_ADJUSTABLE_LDO(VDD2, 0x63, 16), TWL_FIXED_LDO(VUSB1V5, 0x71, 1500, 17), TWL_FIXED_LDO(VUSB1V8, 0x74, 1800, 18), TWL_FIXED_LDO(VUSB3V1, 0x77, 3100, 19), -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info 2009-11-25 10:04 ` [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info Juha Keski-Saari @ 2009-11-25 13:38 ` Juha Keski-Saari 2009-11-25 13:49 ` Liam Girdwood 0 siblings, 1 reply; 13+ messages in thread From: Juha Keski-Saari @ 2009-11-25 13:38 UTC (permalink / raw) To: lrg@slimlogic.co.uk Cc: broonie@opensource.wolfsonmicro.com, dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org, De-Schrijver Peter (Nokia-D/Helsinki), Valentin Eduardo (Nokia-D/Helsinki) Regrettably it seems I slipped a mistake into this patch which took out the regulators VAUX1-3. Below is a version which removes this issue >From 9ddec9979471fa7ba77532fa50c88137051d2037 Mon Sep 17 00:00:00 2001 From: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Date: Wed, 25 Nov 2009 10:58:46 +0200 Subject: [PATCHv3 1/3] twl4030-regulator: Add all TWL regulators to twreg_info Define all twl4030 regulators in the twlreg_info table, along with appropriate VSEL tables for adjustable regulators Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> --- drivers/regulator/twl4030-regulator.c | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c index 9365140..c50b8b7 100644 --- a/drivers/regulator/twl4030-regulator.c +++ b/drivers/regulator/twl4030-regulator.c @@ -260,7 +260,18 @@ static const u16 VSIM_VSEL_table[] = { static const u16 VDAC_VSEL_table[] = { 1200, 1300, 1800, 1800, }; - +static const u16 VDD1_VSEL_table[] = { + 800, 1450, +}; +static const u16 VDD2_VSEL_table[] = { + 800, 1450, 1500, +}; +static const u16 VIO_VSEL_table[] = { + 1800, 1850, +}; +static const u16 VINTANA2_VSEL_table[] = { + 2500, 2750, +}; static int twl4030ldo_list_voltage(struct regulator_dev *rdev, unsigned index) { @@ -397,20 +408,16 @@ static struct twlreg_info twl4030_regs[] = { TWL_ADJUSTABLE_LDO(VAUX4, 0x23, 4), TWL_ADJUSTABLE_LDO(VMMC1, 0x27, 5), TWL_ADJUSTABLE_LDO(VMMC2, 0x2b, 6), - /* TWL_ADJUSTABLE_LDO(VPLL1, 0x2f, 7), - */ TWL_ADJUSTABLE_LDO(VPLL2, 0x33, 8), TWL_ADJUSTABLE_LDO(VSIM, 0x37, 9), TWL_ADJUSTABLE_LDO(VDAC, 0x3b, 10), - /* - TWL_ADJUSTABLE_LDO(VINTANA1, 0x3f, 11), + TWL_FIXED_LDO(VINTANA1, 0x3f, 1500, 11), TWL_ADJUSTABLE_LDO(VINTANA2, 0x43, 12), - TWL_ADJUSTABLE_LDO(VINTDIG, 0x47, 13), - TWL_SMPS(VIO, 0x4b, 14), - TWL_SMPS(VDD1, 0x55, 15), - TWL_SMPS(VDD2, 0x63, 16), - */ + TWL_FIXED_LDO(VINTDIG, 0x47, 1500, 13), + TWL_ADJUSTABLE_LDO(VIO, 0x4b, 14), + TWL_ADJUSTABLE_LDO(VDD1, 0x55, 15), + TWL_ADJUSTABLE_LDO(VDD2, 0x63, 16), TWL_FIXED_LDO(VUSB1V5, 0x71, 1500, 17), TWL_FIXED_LDO(VUSB1V8, 0x74, 1800, 18), TWL_FIXED_LDO(VUSB3V1, 0x77, 3100, 19), -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info 2009-11-25 13:38 ` Juha Keski-Saari @ 2009-11-25 13:49 ` Liam Girdwood 2009-11-25 14:22 ` Juha Keski-Saari 0 siblings, 1 reply; 13+ messages in thread From: Liam Girdwood @ 2009-11-25 13:49 UTC (permalink / raw) To: Juha Keski-Saari Cc: broonie@opensource.wolfsonmicro.com, dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org, De-Schrijver Peter (Nokia-D/Helsinki), Valentin Eduardo (Nokia-D/Helsinki) On Wed, 2009-11-25 at 15:38 +0200, Juha Keski-Saari wrote: > Regrettably it seems I slipped a mistake into this patch which took out > the regulators VAUX1-3. Below is a version which removes this issue > Ah, I've just applied and pushed this series. Can you redo against voltage for-next ? Thanks Liam ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info 2009-11-25 13:49 ` Liam Girdwood @ 2009-11-25 14:22 ` Juha Keski-Saari 2009-11-25 14:33 ` Mark Brown 2009-11-25 18:19 ` Liam Girdwood 0 siblings, 2 replies; 13+ messages in thread From: Juha Keski-Saari @ 2009-11-25 14:22 UTC (permalink / raw) To: ext Liam Girdwood Cc: broonie@opensource.wolfsonmicro.com, dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org, De-Schrijver Peter (Nokia-D/Helsinki), Valentin Eduardo (Nokia-D/Helsinki) On Wed, 2009-11-25 at 14:49 +0100, ext Liam Girdwood wrote: > On Wed, 2009-11-25 at 15:38 +0200, Juha Keski-Saari wrote: > > Regrettably it seems I slipped a mistake into this patch which took out > > the regulators VAUX1-3. Below is a version which removes this issue > > > > Ah, I've just applied and pushed this series. Can you redo against > voltage for-next ? > > Thanks > > Liam Here are the additions done on recent voltage-2.6/for-next, my apologies for the extra work >From 03578bd4f927f7777557be6d473eb0011b80608a Mon Sep 17 00:00:00 2001 From: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Date: Wed, 25 Nov 2009 16:18:35 +0200 Subject: [PATCH] twl4030-regulator: Fixes VAUX1-3 exclusion introduced in 3277b9fce0fcaa68d5947429e062163852ebc6fb Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> --- drivers/regulator/twl4030-regulator.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c index 02100bc..477c965 100644 --- a/drivers/regulator/twl4030-regulator.c +++ b/drivers/regulator/twl4030-regulator.c @@ -401,6 +401,10 @@ static struct regulator_ops twl4030fixed_ops = { * software control over them after boot. */ static struct twlreg_info twl4030_regs[] = { + TWL_ADJUSTABLE_LDO(VAUX1, 0x17, 1), + TWL_ADJUSTABLE_LDO(VAUX2_4030, 0x1b, 2), + TWL_ADJUSTABLE_LDO(VAUX2, 0x1b, 2), + TWL_ADJUSTABLE_LDO(VAUX3, 0x1f, 3), TWL_ADJUSTABLE_LDO(VAUX4, 0x23, 4), TWL_ADJUSTABLE_LDO(VMMC1, 0x27, 5), TWL_ADJUSTABLE_LDO(VMMC2, 0x2b, 6), -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info 2009-11-25 14:22 ` Juha Keski-Saari @ 2009-11-25 14:33 ` Mark Brown 2009-11-25 18:19 ` Liam Girdwood 1 sibling, 0 replies; 13+ messages in thread From: Mark Brown @ 2009-11-25 14:33 UTC (permalink / raw) To: Juha Keski-Saari Cc: ext Liam Girdwood, dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org, De-Schrijver Peter (Nokia-D/Helsinki), Valentin Eduardo (Nokia-D/Helsinki) On Wed, Nov 25, 2009 at 04:22:43PM +0200, Juha Keski-Saari wrote: > Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> all these are Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info 2009-11-25 14:22 ` Juha Keski-Saari 2009-11-25 14:33 ` Mark Brown @ 2009-11-25 18:19 ` Liam Girdwood 1 sibling, 0 replies; 13+ messages in thread From: Liam Girdwood @ 2009-11-25 18:19 UTC (permalink / raw) To: Juha Keski-Saari Cc: broonie@opensource.wolfsonmicro.com, dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org, De-Schrijver Peter (Nokia-D/Helsinki), Valentin Eduardo (Nokia-D/Helsinki) On Wed, 2009-11-25 at 16:22 +0200, Juha Keski-Saari wrote: > On Wed, 2009-11-25 at 14:49 +0100, ext Liam Girdwood wrote: > > On Wed, 2009-11-25 at 15:38 +0200, Juha Keski-Saari wrote: > > > Regrettably it seems I slipped a mistake into this patch which took out > > > the regulators VAUX1-3. Below is a version which removes this issue > > > > > > > Ah, I've just applied and pushed this series. Can you redo against > > voltage for-next ? > > > > Thanks > > > > Liam > > Here are the additions done on recent voltage-2.6/for-next, my apologies > for the extra work > > >From 03578bd4f927f7777557be6d473eb0011b80608a Mon Sep 17 00:00:00 2001 > From: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> > Date: Wed, 25 Nov 2009 16:18:35 +0200 > Subject: [PATCH] twl4030-regulator: Fixes VAUX1-3 exclusion introduced > in 3277b9fce0fcaa68d5947429e062163852ebc6fb > > Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> > --- > drivers/regulator/twl4030-regulator.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > Applied. Thanks Liam ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCHv2 2/3] Reset REMAP configuration in regulator probe 2009-11-25 10:04 [PATCHv2 0/3] for-next: Add all twl4030 regulators to RegFW Juha Keski-Saari 2009-11-25 10:04 ` [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info Juha Keski-Saari @ 2009-11-25 10:04 ` Juha Keski-Saari 2009-11-25 10:04 ` [PATCHv2 3/3] Define critical regulators as always_on Juha Keski-Saari 2 siblings, 0 replies; 13+ messages in thread From: Juha Keski-Saari @ 2009-11-25 10:04 UTC (permalink / raw) To: lrg, broonie, dbrownell, linux-kernel Cc: peter.de-schrijver, eduardo.valentin, ext-juha.1.keski-saari This patch makes the probe recover the regulator REMAP configuration into the state it is on reset to make sure the RegFW has proper control over the regulator states Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> --- drivers/regulator/twl4030-regulator.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c index 75da6af..7029fb9 100644 --- a/drivers/regulator/twl4030-regulator.c +++ b/drivers/regulator/twl4030-regulator.c @@ -420,6 +420,13 @@ static struct twlreg_info twl4030_regs[] = { /* VUSBCP is managed *only* by the USB subchip */ }; +static const u8 REG_REMAP_table[] = { + 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x08, + 0x08, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, +}; + static int twl4030reg_probe(struct platform_device *pdev) { int i; @@ -458,6 +465,8 @@ static int twl4030reg_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, rdev); + twl4030reg_write(info, VREG_REMAP, REG_REMAP_table[pdev->id]); + /* NOTE: many regulators support short-circuit IRQs (presentable * as REGULATOR_OVER_CURRENT notifications?) configured via: * - SC_CONFIG -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv2 3/3] Define critical regulators as always_on 2009-11-25 10:04 [PATCHv2 0/3] for-next: Add all twl4030 regulators to RegFW Juha Keski-Saari 2009-11-25 10:04 ` [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info Juha Keski-Saari 2009-11-25 10:04 ` [PATCHv2 2/3] Reset REMAP configuration in regulator probe Juha Keski-Saari @ 2009-11-25 10:04 ` Juha Keski-Saari 2009-11-25 10:14 ` Mark Brown 2 siblings, 1 reply; 13+ messages in thread From: Juha Keski-Saari @ 2009-11-25 10:04 UTC (permalink / raw) To: lrg, broonie, dbrownell, linux-kernel Cc: peter.de-schrijver, eduardo.valentin, ext-juha.1.keski-saari Defines VIO, VDD1, VDD2, VPLL1 and VINT* regulators as always_on by default since they are critical to TWL and its master's functionality and should be on in all cases where RegFW is used Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> --- drivers/regulator/twl4030-regulator.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c index 7029fb9..af53f35 100644 --- a/drivers/regulator/twl4030-regulator.c +++ b/drivers/regulator/twl4030-regulator.c @@ -456,6 +456,14 @@ static int twl4030reg_probe(struct platform_device *pdev) c->valid_ops_mask &= REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS; + if (pdev->id == TWL4030_REG_VIO || + pdev->id == TWL4030_REG_VDD1 || + pdev->id == TWL4030_REG_VDD2 || + pdev->id == TWL4030_REG_VPLL1 || + pdev->id == TWL4030_REG_VINTANA1 || + pdev->id == TWL4030_REG_VINTANA2 || + pdev->id == TWL4030_REG_VINTDIG) + c->always_on = true; rdev = regulator_register(&info->desc, &pdev->dev, initdata, info); if (IS_ERR(rdev)) { -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCHv2 3/3] Define critical regulators as always_on 2009-11-25 10:04 ` [PATCHv2 3/3] Define critical regulators as always_on Juha Keski-Saari @ 2009-11-25 10:14 ` Mark Brown 2009-11-25 10:29 ` Juha Keski-Saari 0 siblings, 1 reply; 13+ messages in thread From: Mark Brown @ 2009-11-25 10:14 UTC (permalink / raw) To: Juha Keski-Saari Cc: lrg, dbrownell, linux-kernel, peter.de-schrijver, eduardo.valentin On Wed, Nov 25, 2009 at 12:04:55PM +0200, Juha Keski-Saari wrote: > + if (pdev->id == TWL4030_REG_VIO || > + pdev->id == TWL4030_REG_VDD1 || > + pdev->id == TWL4030_REG_VDD2 || > + pdev->id == TWL4030_REG_VPLL1 || > + pdev->id == TWL4030_REG_VINTANA1 || > + pdev->id == TWL4030_REG_VINTANA2 || > + pdev->id == TWL4030_REG_VINTDIG) > + c->always_on = true; This would be a bit clearer and much more idiomatic as a switch statement. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 3/3] Define critical regulators as always_on 2009-11-25 10:14 ` Mark Brown @ 2009-11-25 10:29 ` Juha Keski-Saari 2009-11-25 11:13 ` Mark Brown 0 siblings, 1 reply; 13+ messages in thread From: Juha Keski-Saari @ 2009-11-25 10:29 UTC (permalink / raw) To: ext Mark Brown Cc: lrg@slimlogic.co.uk, dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org, De-Schrijver Peter (Nokia-D/Helsinki), Valentin Eduardo (Nokia-D/Helsinki) On Wed, 2009-11-25 at 11:14 +0100, ext Mark Brown wrote: > On Wed, Nov 25, 2009 at 12:04:55PM +0200, Juha Keski-Saari wrote: > > > + if (pdev->id == TWL4030_REG_VIO || > > + pdev->id == TWL4030_REG_VDD1 || > > + pdev->id == TWL4030_REG_VDD2 || > > + pdev->id == TWL4030_REG_VPLL1 || > > + pdev->id == TWL4030_REG_VINTANA1 || > > + pdev->id == TWL4030_REG_VINTANA2 || > > + pdev->id == TWL4030_REG_VINTDIG) > > + c->always_on = true; > > This would be a bit clearer and much more idiomatic as a switch > statement. A switch statement sounds like a better idea, yes. Below is a version that implements that change. >From 469f1f3fac05a740484cb32469b64aae424ba4de Mon Sep 17 00:00:00 2001 From: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Date: Wed, 25 Nov 2009 11:10:35 +0200 Subject: [PATCHv3 3/3] Define critical regulators as always_on Defines VIO, VDD1, VDD2, VPLL1 and VINT* regulators as always_on by default since they are critical to TWL and its master's functionality and should be on in all cases where RegFW is used Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> --- drivers/regulator/twl4030-regulator.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c index 7029fb9..02100bc 100644 --- a/drivers/regulator/twl4030-regulator.c +++ b/drivers/regulator/twl4030-regulator.c @@ -456,6 +456,19 @@ static int twl4030reg_probe(struct platform_device *pdev) c->valid_ops_mask &= REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS; + switch(pdev->id) { + case TWL4030_REG_VIO: + case TWL4030_REG_VDD1: + case TWL4030_REG_VDD2: + case TWL4030_REG_VPLL1: + case TWL4030_REG_VINTANA1: + case TWL4030_REG_VINTANA2: + case TWL4030_REG_VINTDIG: + c->always_on = true; + break; + default: + break; + } rdev = regulator_register(&info->desc, &pdev->dev, initdata, info); if (IS_ERR(rdev)) { -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCHv2 3/3] Define critical regulators as always_on 2009-11-25 10:29 ` Juha Keski-Saari @ 2009-11-25 11:13 ` Mark Brown 2009-11-25 11:36 ` Juha Keski-Saari 0 siblings, 1 reply; 13+ messages in thread From: Mark Brown @ 2009-11-25 11:13 UTC (permalink / raw) To: Juha Keski-Saari Cc: lrg@slimlogic.co.uk, dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org, De-Schrijver Peter (Nokia-D/Helsinki), Valentin Eduardo (Nokia-D/Helsinki) On Wed, Nov 25, 2009 at 12:29:59PM +0200, Juha Keski-Saari wrote: > + case TWL4030_REG_VINTDIG: > + c->always_on = true; > + break; One other thing I noticed having seen the MFD series - is this going to build without the separate MFD patch you've posted? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv2 3/3] Define critical regulators as always_on 2009-11-25 11:13 ` Mark Brown @ 2009-11-25 11:36 ` Juha Keski-Saari 0 siblings, 0 replies; 13+ messages in thread From: Juha Keski-Saari @ 2009-11-25 11:36 UTC (permalink / raw) To: ext Mark Brown Cc: lrg@slimlogic.co.uk, dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org, De-Schrijver Peter (Nokia-D/Helsinki), Valentin Eduardo (Nokia-D/Helsinki) On Wed, 2009-11-25 at 12:13 +0100, ext Mark Brown wrote: > On Wed, Nov 25, 2009 at 12:29:59PM +0200, Juha Keski-Saari wrote: > > > + case TWL4030_REG_VINTDIG: > > + c->always_on = true; > > + break; > > One other thing I noticed having seen the MFD series - is this going to > build without the separate MFD patch you've posted? Yes, the changes to twl4030-regulator.c compile without the changes the MFD patch set makes to twl4030-core.c and twl4030.h ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-11-25 18:19 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-25 10:04 [PATCHv2 0/3] for-next: Add all twl4030 regulators to RegFW Juha Keski-Saari 2009-11-25 10:04 ` [PATCHv2 1/3] twl4030-regulator: Add all TWL regulators to twreg_info Juha Keski-Saari 2009-11-25 13:38 ` Juha Keski-Saari 2009-11-25 13:49 ` Liam Girdwood 2009-11-25 14:22 ` Juha Keski-Saari 2009-11-25 14:33 ` Mark Brown 2009-11-25 18:19 ` Liam Girdwood 2009-11-25 10:04 ` [PATCHv2 2/3] Reset REMAP configuration in regulator probe Juha Keski-Saari 2009-11-25 10:04 ` [PATCHv2 3/3] Define critical regulators as always_on Juha Keski-Saari 2009-11-25 10:14 ` Mark Brown 2009-11-25 10:29 ` Juha Keski-Saari 2009-11-25 11:13 ` Mark Brown 2009-11-25 11:36 ` Juha Keski-Saari
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox