* [PATCH 0/1] Add all TWL4030 regulators to Regulator framework @ 2009-11-18 11:45 Juha Keski-Saari 2009-11-18 11:46 ` [PATCH 1/1] " Juha Keski-Saari 0 siblings, 1 reply; 15+ messages in thread From: Juha Keski-Saari @ 2009-11-18 11:45 UTC (permalink / raw) To: sameo, dbrownell, tony, broonie, linux-kernel, lrg, adrian.hunter, amit.kucheria, dtor Cc: Valentin Eduardo Bezerra, De-Schrijver Peter (Nokia-D/Helsinki), Kristo Tero (Nokia-D/Tampere) This patch adds all the remaining TWL4030 regulators into the implementation. These changes are based on top of Linus' tree master branch, since it is ahead of the mfd-2.6. Juha Keski-Saari (1): Add all TWL regulators to Regulator framework drivers/mfd/twl4030-core.c | 30 ++++++++++++++++++++++++++---- drivers/regulator/twl4030-regulator.c | 27 +++++++++++++++++---------- include/linux/i2c/twl4030.h | 8 ++++++-- 3 files changed, 49 insertions(+), 16 deletions(-) ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-18 11:45 [PATCH 0/1] Add all TWL4030 regulators to Regulator framework Juha Keski-Saari @ 2009-11-18 11:46 ` Juha Keski-Saari 2009-11-18 13:39 ` Mark Brown 2009-11-18 17:51 ` Dmitry Torokhov 0 siblings, 2 replies; 15+ messages in thread From: Juha Keski-Saari @ 2009-11-18 11:46 UTC (permalink / raw) To: sameo@linux.intel.com, dbrownell@users.sourceforge.net, tony@atomide.com, broonie@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru Cc: Valentin Eduardo (Nokia-D/Helsinki), De-Schrijver Peter (Nokia-D/Helsinki), Kristo Tero (Nokia-D/Tampere) This patch adds all the remaining TWL4030 regulators into the implementation, also adding VINT* regulators in this way since they can be derived out from the TWL Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> --- drivers/mfd/twl4030-core.c | 30 ++++++++++++++++++++++++++---- drivers/regulator/twl4030-regulator.c | 27 +++++++++++++++++---------- include/linux/i2c/twl4030.h | 8 ++++++-- 3 files changed, 49 insertions(+), 16 deletions(-) diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c index a1c47ee..0748b43 100644 --- a/drivers/mfd/twl4030-core.c +++ b/drivers/mfd/twl4030-core.c @@ -602,13 +602,15 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) } if (twl_has_regulator()) { - /* - child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1); + child = add_regulator(TWL4030_REG_VDD1, pdata->vdd1); if (IS_ERR(child)) return PTR_ERR(child); - */ - child = add_regulator(TWL4030_REG_VMMC1, pdata->vmmc1); + child = add_regulator(TWL4030_REG_VDD2, pdata->vdd2); + if (IS_ERR(child)) + return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VIO, pdata->vio); if (IS_ERR(child)) return PTR_ERR(child); @@ -616,12 +618,32 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) if (IS_ERR(child)) return PTR_ERR(child); + child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1); + if (IS_ERR(child)) + return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VMMC1, pdata->vmmc1); + if (IS_ERR(child)) + return PTR_ERR(child); + child = add_regulator((features & TWL4030_VAUX2) ? TWL4030_REG_VAUX2_4030 : TWL4030_REG_VAUX2, pdata->vaux2); if (IS_ERR(child)) return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VINTANA1, pdata->vintana1); + if (IS_ERR(child)) + return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VINTANA2, pdata->vintana2); + if (IS_ERR(child)) + return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VINTDIG, pdata->vintdig); + if (IS_ERR(child)) + return PTR_ERR(child); } /* maybe add LDOs that are omitted on cost-reduced parts */ diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c index e2032fb..949c414 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), diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h index 508824e..d26f96d 100644 --- a/include/linux/i2c/twl4030.h +++ b/include/linux/i2c/twl4030.h @@ -421,8 +421,12 @@ struct twl4030_platform_data { struct regulator_init_data *vaux2; struct regulator_init_data *vaux3; struct regulator_init_data *vaux4; - - /* REVISIT more to come ... _nothing_ should be hard-wired */ + struct regulator_init_data *vio; + struct regulator_init_data *vdd1; + struct regulator_init_data *vdd2; + struct regulator_init_data *vintana1; + struct regulator_init_data *vintana2; + struct regulator_init_data *vintdig; }; /*----------------------------------------------------------------------*/ -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-18 11:46 ` [PATCH 1/1] " Juha Keski-Saari @ 2009-11-18 13:39 ` Mark Brown 2009-11-18 14:36 ` Eduardo Valentin 2009-11-18 17:51 ` Dmitry Torokhov 1 sibling, 1 reply; 15+ messages in thread From: Mark Brown @ 2009-11-18 13:39 UTC (permalink / raw) To: Juha Keski-Saari Cc: sameo@linux.intel.com, dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Valentin Eduardo (Nokia-D/Helsinki), De-Schrijver Peter (Nokia-D/Helsinki), Kristo Tero (Nokia-D/Tampere) On Wed, Nov 18, 2009 at 01:46:35PM +0200, Juha Keski-Saari wrote: > This patch adds all the remaining TWL4030 regulators into the implementation, > also adding VINT* regulators in this way since they can be derived out from > the TWL > > Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> This is fine from an API point of view but I worry that if any of the boards are using regulator_has_full_constraints() then this will break them by causing them to be powered off at the end of init. Have you checked the in-tree twl4030 users for this? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-18 13:39 ` Mark Brown @ 2009-11-18 14:36 ` Eduardo Valentin 2009-11-18 14:41 ` Mark Brown 0 siblings, 1 reply; 15+ messages in thread From: Eduardo Valentin @ 2009-11-18 14:36 UTC (permalink / raw) To: ext Mark Brown Cc: Keski-Saari Juha.1 (EXT-Teleca/Helsinki), sameo@linux.intel.com, dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Valentin Eduardo (Nokia-D/Helsinki), De-Schrijver Peter (Nokia-D/Helsinki), Kristo Tero (Nokia-D/Tampere) On Wed, Nov 18, 2009 at 02:39:39PM +0100, Mark Brown wrote: > On Wed, Nov 18, 2009 at 01:46:35PM +0200, Juha Keski-Saari wrote: > > This patch adds all the remaining TWL4030 regulators into the implementation, > > also adding VINT* regulators in this way since they can be derived out from > > the TWL > > > > Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> > > This is fine from an API point of view but I worry that if any of the > boards are using regulator_has_full_constraints() then this will break > them by causing them to be powered off at the end of init. Have you > checked the in-tree twl4030 users for this? Looks like no one is using the regulator_has_full_constraints(). At least the twl4030 users. But maybe these VINT* should be set as always_on in twl4030-regulator driver? -- Eduardo Valentin ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-18 14:36 ` Eduardo Valentin @ 2009-11-18 14:41 ` Mark Brown 2009-11-19 7:04 ` Juha Keski-Saari 0 siblings, 1 reply; 15+ messages in thread From: Mark Brown @ 2009-11-18 14:41 UTC (permalink / raw) To: Eduardo Valentin Cc: Keski-Saari Juha.1 (EXT-Teleca/Helsinki), sameo@linux.intel.com, dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, De-Schrijver Peter (Nokia-D/Helsinki), Kristo Tero (Nokia-D/Tampere) On Wed, Nov 18, 2009 at 04:36:09PM +0200, Eduardo Valentin wrote: > But maybe these VINT* should be set as always_on in twl4030-regulator driver? Can they support any external load at all? If not then it would make sense for the chip driver to at least provide a default set of constraints for them rather than forcing all the machine drivers to do it manually. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-18 14:41 ` Mark Brown @ 2009-11-19 7:04 ` Juha Keski-Saari 2009-11-19 9:24 ` Peter 'p2' De Schrijver 0 siblings, 1 reply; 15+ messages in thread From: Juha Keski-Saari @ 2009-11-19 7:04 UTC (permalink / raw) To: ext Mark Brown Cc: Valentin Eduardo (Nokia-D/Helsinki), sameo@linux.intel.com, dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, De-Schrijver Peter (Nokia-D/Helsinki), Kristo Tero (Nokia-D/Tampere) ext Mark Brown wrote: > On Wed, Nov 18, 2009 at 04:36:09PM +0200, Eduardo Valentin wrote: > >> But maybe these VINT* should be set as always_on in twl4030-regulator driver? > > Can they support any external load at all? If not then it would make > sense for the chip driver to at least provide a default set of > constraints for them rather than forcing all the machine drivers to do > it manually. From the TRM it appears that the max current output values are as follows VINTANA1 - 30mA VINTANA2 - 250mA VINTDIG - 100mA Theoretically they may be able to support external load depending on your machine configuration but still I think providing constraints for them in the chip driver could be a good idea since the "always-on" limitation is imposed by the chip and not the machine. Without these three supplies the TWL does not function properly, if at all. Also worth noting is that the current implementation of RegulatorFW doesn't appear to be able to turn these supplies off (comparing TWL register content with framework status). ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-19 7:04 ` Juha Keski-Saari @ 2009-11-19 9:24 ` Peter 'p2' De Schrijver 2009-11-19 10:30 ` Mark Brown 0 siblings, 1 reply; 15+ messages in thread From: Peter 'p2' De Schrijver @ 2009-11-19 9:24 UTC (permalink / raw) To: Keski-Saari Juha.1 (EXT-Teleca/Helsinki) Cc: ext Mark Brown, Valentin Eduardo (Nokia-D/Helsinki), sameo@linux.intel.com, dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Kristo Tero (Nokia-D/Tampere) On Thu, Nov 19, 2009 at 08:04:08AM +0100, Keski-Saari Juha.1 (EXT-Teleca/Helsinki) wrote: > ext Mark Brown wrote: > > On Wed, Nov 18, 2009 at 04:36:09PM +0200, Eduardo Valentin wrote: > > > >> But maybe these VINT* should be set as always_on in twl4030-regulator driver? > > > > Can they support any external load at all? If not then it would make > > sense for the chip driver to at least provide a default set of > > constraints for them rather than forcing all the machine drivers to do > > it manually. > > From the TRM it appears that the max current output values are as follows > > VINTANA1 - 30mA > VINTANA2 - 250mA > VINTDIG - 100mA > > Theoretically they may be able to support external load depending on your machine configuration but still I think providing constraints for them in > the chip driver could be a good idea since the "always-on" limitation is imposed by the chip and not the machine. Without these three supplies the TWL > does not function properly, if at all. Also worth noting is that the current implementation of RegulatorFW doesn't appear to be able to turn these > supplies off (comparing TWL register content with framework status). VINTANA2 can be turned off if MADC, audio and USB are not used. Cheers, Peter. -- goa is a state of mind ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-19 9:24 ` Peter 'p2' De Schrijver @ 2009-11-19 10:30 ` Mark Brown 2009-11-20 10:06 ` Samuel Ortiz 0 siblings, 1 reply; 15+ messages in thread From: Mark Brown @ 2009-11-19 10:30 UTC (permalink / raw) To: Peter 'p2' De Schrijver Cc: Keski-Saari Juha.1 (EXT-Teleca/Helsinki), Valentin Eduardo (Nokia-D/Helsinki), sameo@linux.intel.com, dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Kristo Tero (Nokia-D/Tampere) On Thu, Nov 19, 2009 at 11:24:12AM +0200, Peter 'p2' De Schrijver wrote: > VINTANA2 can be turned off if MADC, audio and USB are not used. Sounds like it'd be useful to add regulator support for those drivers, then. In any case, since nobody is using regulator_has_full_constraints() Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-19 10:30 ` Mark Brown @ 2009-11-20 10:06 ` Samuel Ortiz 2009-11-20 10:32 ` Liam Girdwood 0 siblings, 1 reply; 15+ messages in thread From: Samuel Ortiz @ 2009-11-20 10:06 UTC (permalink / raw) To: Mark Brown Cc: Peter 'p2' De Schrijver, Keski-Saari Juha.1 (EXT-Teleca/Helsinki), Valentin Eduardo (Nokia-D/Helsinki), dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Kristo Tero (Nokia-D/Tampere) Hi Mark, On Thu, Nov 19, 2009 at 10:30:54AM +0000, Mark Brown wrote: > On Thu, Nov 19, 2009 at 11:24:12AM +0200, Peter 'p2' De Schrijver wrote: > > > VINTANA2 can be turned off if MADC, audio and USB are not used. > > Sounds like it'd be useful to add regulator support for those drivers, > then. > > In any case, since nobody is using regulator_has_full_constraints() > > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Would you mind carrying this one with your twl4030-mfd branch ? It doesnt apply cleanly to my tree due to the missing twl4030 patches from Peter. Acked-by: Samuel Ortiz <sameo@linux.intel.com> Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-20 10:06 ` Samuel Ortiz @ 2009-11-20 10:32 ` Liam Girdwood 2009-11-20 11:28 ` Mark Brown 0 siblings, 1 reply; 15+ messages in thread From: Liam Girdwood @ 2009-11-20 10:32 UTC (permalink / raw) To: Samuel Ortiz, Keski-Saari Juha.1 (EXT-Teleca/Helsinki) Cc: Mark Brown, Peter 'p2' De Schrijver, Keski-Saari Juha.1 (EXT-Teleca/Helsinki), Valentin Eduardo (Nokia-D/Helsinki), dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Kristo Tero (Nokia-D/Tampere) On Fri, 2009-11-20 at 11:06 +0100, Samuel Ortiz wrote: > Hi Mark, > > On Thu, Nov 19, 2009 at 10:30:54AM +0000, Mark Brown wrote: > > On Thu, Nov 19, 2009 at 11:24:12AM +0200, Peter 'p2' De Schrijver wrote: > > > > > VINTANA2 can be turned off if MADC, audio and USB are not used. > > > > Sounds like it'd be useful to add regulator support for those drivers, > > then. > > > > In any case, since nobody is using regulator_has_full_constraints() > > > > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> > Would you mind carrying this one with your twl4030-mfd branch ? It doesnt > apply cleanly to my tree due to the missing twl4030 patches from Peter. > > Acked-by: Samuel Ortiz <sameo@linux.intel.com> Juha, this doesn't apply to regulator for-next either. Is it possible to split it out into a patch for mfd and a patch for regulator (against their for-next branches) ? Thanks Liam ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-20 10:32 ` Liam Girdwood @ 2009-11-20 11:28 ` Mark Brown 2009-11-20 12:21 ` Liam Girdwood 2009-11-23 13:26 ` Juha Keski-Saari 0 siblings, 2 replies; 15+ messages in thread From: Mark Brown @ 2009-11-20 11:28 UTC (permalink / raw) To: Liam Girdwood Cc: Samuel Ortiz, Keski-Saari Juha.1 (EXT-Teleca/Helsinki), Peter 'p2' De Schrijver, Valentin Eduardo (Nokia-D/Helsinki), dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Kristo Tero (Nokia-D/Tampere) On Fri, Nov 20, 2009 at 10:32:25AM +0000, Liam Girdwood wrote: > On Fri, 2009-11-20 at 11:06 +0100, Samuel Ortiz wrote: > > Would you mind carrying this one with your twl4030-mfd branch ? It doesnt > > apply cleanly to my tree due to the missing twl4030 patches from Peter. > > Acked-by: Samuel Ortiz <sameo@linux.intel.com> > Juha, this doesn't apply to regulator for-next either. Is it possible to > split it out into a patch for mfd and a patch for regulator (against > their for-next branches) ? Either the existing twl4030-mfd branch or split patches work for me. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-20 11:28 ` Mark Brown @ 2009-11-20 12:21 ` Liam Girdwood 2009-11-20 12:36 ` Mark Brown 2009-11-23 13:26 ` Juha Keski-Saari 1 sibling, 1 reply; 15+ messages in thread From: Liam Girdwood @ 2009-11-20 12:21 UTC (permalink / raw) To: Mark Brown Cc: Samuel Ortiz, Keski-Saari Juha.1 (EXT-Teleca/Helsinki), Peter 'p2' De Schrijver, Valentin Eduardo (Nokia-D/Helsinki), dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Kristo Tero (Nokia-D/Tampere) On Fri, 2009-11-20 at 11:28 +0000, Mark Brown wrote: > On Fri, Nov 20, 2009 at 10:32:25AM +0000, Liam Girdwood wrote: > > On Fri, 2009-11-20 at 11:06 +0100, Samuel Ortiz wrote: > > > > Would you mind carrying this one with your twl4030-mfd branch ? It doesnt > > > apply cleanly to my tree due to the missing twl4030 patches from Peter. > > > > Acked-by: Samuel Ortiz <sameo@linux.intel.com> > > > Juha, this doesn't apply to regulator for-next either. Is it possible to > > split it out into a patch for mfd and a patch for regulator (against > > their for-next branches) ? > > Either the existing twl4030-mfd branch or split patches work for me. What's the upstream path for your twl4030-mfd ASoC branch ? Regulator + mfd patches either go upstream via the regulator or mfd repositories. Liam ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-20 12:21 ` Liam Girdwood @ 2009-11-20 12:36 ` Mark Brown 0 siblings, 0 replies; 15+ messages in thread From: Mark Brown @ 2009-11-20 12:36 UTC (permalink / raw) To: Liam Girdwood Cc: Samuel Ortiz, Keski-Saari Juha.1 (EXT-Teleca/Helsinki), Peter 'p2' De Schrijver, Valentin Eduardo (Nokia-D/Helsinki), dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Kristo Tero (Nokia-D/Tampere) On Fri, Nov 20, 2009 at 12:21:43PM +0000, Liam Girdwood wrote: > On Fri, 2009-11-20 at 11:28 +0000, Mark Brown wrote: > > Either the existing twl4030-mfd branch or split patches work for me. > What's the upstream path for your twl4030-mfd ASoC branch ? ALSA with bits also pulled into the OMAP tree. > Regulator + mfd patches either go upstream via the regulator or mfd > repositories. Yes, ideally - the existing stuff is going via ALSA since the MFD and ASoC sides can't be split up sensibly without breaking bisection. Another option would be to hold off on applying the patch until things have settled down in the merge window and then push it via regulator - the ALSA tree normally goes in early in the merge window. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-20 11:28 ` Mark Brown 2009-11-20 12:21 ` Liam Girdwood @ 2009-11-23 13:26 ` Juha Keski-Saari 1 sibling, 0 replies; 15+ messages in thread From: Juha Keski-Saari @ 2009-11-23 13:26 UTC (permalink / raw) To: ext Mark Brown Cc: Liam Girdwood, Samuel Ortiz, De-Schrijver Peter (Nokia-D/Helsinki), Valentin Eduardo (Nokia-D/Helsinki), dbrownell@users.sourceforge.net, tony@atomide.com, linux-kernel@vger.kernel.org, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, dtor@mail.ru, Kristo Tero (Nokia-D/Tampere) twl4030-mfd: Add all TWL regulators to RegFW Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> --- drivers/mfd/twl4030-core.c | 26 ++++++++++++++++++++++++-- drivers/regulator/twl4030-regulator.c | 26 +++++++++++++++++--------- include/linux/i2c/twl4030.h | 8 ++++++-- 3 files changed, 47 insertions(+), 13 deletions(-) diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c index 0ee81e4..2d659e6 100644 --- a/drivers/mfd/twl4030-core.c +++ b/drivers/mfd/twl4030-core.c @@ -572,11 +572,21 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) } if (twl_has_regulator()) { - /* child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1); if (IS_ERR(child)) return PTR_ERR(child); - */ + + child = add_regulator(TWL4030_REG_VIO, pdata->vio); + if (IS_ERR(child)) + return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VDD1, pdata->vdd1); + if (IS_ERR(child)) + return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VDD2, pdata->vdd2); + if (IS_ERR(child)) + return PTR_ERR(child); child = add_regulator(TWL4030_REG_VMMC1, pdata->vmmc1); if (IS_ERR(child)) @@ -592,6 +602,18 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) pdata->vaux2); if (IS_ERR(child)) return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VINTANA1, pdata->vintana1); + if (IS_ERR(child)) + return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VINTANA2, pdata->vintana2); + if (IS_ERR(child)) + return PTR_ERR(child); + + child = add_regulator(TWL4030_REG_VINTDIG, pdata->vintdig); + if (IS_ERR(child)) + return PTR_ERR(child); } if (twl_has_regulator() && usb_transceiver) { diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c index e2032fb..edd1a1f 100644 --- a/drivers/regulator/twl4030-regulator.c +++ b/drivers/regulator/twl4030-regulator.c @@ -260,6 +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 +409,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), diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h index c188961..bf143d8 100644 --- a/include/linux/i2c/twl4030.h +++ b/include/linux/i2c/twl4030.h @@ -440,8 +440,12 @@ struct twl4030_platform_data { struct regulator_init_data *vaux2; struct regulator_init_data *vaux3; struct regulator_init_data *vaux4; - - /* REVISIT more to come ... _nothing_ should be hard-wired */ + struct regulator_init_data *vio; + struct regulator_init_data *vdd1; + struct regulator_init_data *vdd2; + struct regulator_init_data *vintana1; + struct regulator_init_data *vintana2; + struct regulator_init_data *vintdig; }; /*----------------------------------------------------------------------*/ -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/1] Add all TWL4030 regulators to Regulator framework 2009-11-18 11:46 ` [PATCH 1/1] " Juha Keski-Saari 2009-11-18 13:39 ` Mark Brown @ 2009-11-18 17:51 ` Dmitry Torokhov 1 sibling, 0 replies; 15+ messages in thread From: Dmitry Torokhov @ 2009-11-18 17:51 UTC (permalink / raw) To: Juha Keski-Saari Cc: sameo@linux.intel.com, dbrownell@users.sourceforge.net, tony@atomide.com, broonie@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org, lrg@slimlogic.co.uk, Hunter Adrian (Nokia-D/Helsinki), amit.kucheria@verdurent.com, Valentin Eduardo (Nokia-D/Helsinki), De-Schrijver Peter (Nokia-D/Helsinki), Kristo Tero (Nokia-D/Tampere) On Wed, Nov 18, 2009 at 01:46:35PM +0200, Juha Keski-Saari wrote: > This patch adds all the remaining TWL4030 regulators into the implementation, > also adding VINT* regulators in this way since they can be derived out from > the TWL > > Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com> > --- > drivers/mfd/twl4030-core.c | 30 ++++++++++++++++++++++++++---- > drivers/regulator/twl4030-regulator.c | 27 +++++++++++++++++---------- > include/linux/i2c/twl4030.h | 8 ++++++-- > 3 files changed, 49 insertions(+), 16 deletions(-) > > diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c > index a1c47ee..0748b43 100644 > --- a/drivers/mfd/twl4030-core.c > +++ b/drivers/mfd/twl4030-core.c > @@ -602,13 +602,15 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) > } > > if (twl_has_regulator()) { > - /* > - child = add_regulator(TWL4030_REG_VPLL1, pdata->vpll1); > + child = add_regulator(TWL4030_REG_VDD1, pdata->vdd1); > if (IS_ERR(child)) > return PTR_ERR(child); > - */ > > - child = add_regulator(TWL4030_REG_VMMC1, pdata->vmmc1); > + child = add_regulator(TWL4030_REG_VDD2, pdata->vdd2); > + if (IS_ERR(child)) > + return PTR_ERR(child); > + > + child = add_regulator(TWL4030_REG_VIO, pdata->vio); > if (IS_ERR(child)) > return PTR_ERR(child); Not specifically targeted at this patch - this driver error handling is severely lacking and leaves bund of devices behind when one of them fails to be added. -- Dmitry ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-11-23 13:27 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-18 11:45 [PATCH 0/1] Add all TWL4030 regulators to Regulator framework Juha Keski-Saari 2009-11-18 11:46 ` [PATCH 1/1] " Juha Keski-Saari 2009-11-18 13:39 ` Mark Brown 2009-11-18 14:36 ` Eduardo Valentin 2009-11-18 14:41 ` Mark Brown 2009-11-19 7:04 ` Juha Keski-Saari 2009-11-19 9:24 ` Peter 'p2' De Schrijver 2009-11-19 10:30 ` Mark Brown 2009-11-20 10:06 ` Samuel Ortiz 2009-11-20 10:32 ` Liam Girdwood 2009-11-20 11:28 ` Mark Brown 2009-11-20 12:21 ` Liam Girdwood 2009-11-20 12:36 ` Mark Brown 2009-11-23 13:26 ` Juha Keski-Saari 2009-11-18 17:51 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox