linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V1] regulator: tps65910: Configure correct value for VDDCTRL vout reg
@ 2012-03-07 11:09 Laxman Dewangan
  2012-03-07 19:30 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Laxman Dewangan @ 2012-03-07 11:09 UTC (permalink / raw)
  To: lrg, broonie; +Cc: linux-kernel, linux-tegra, ldewangan

As per datasheet, the voltage output is defined as
from SEL[6:0] = 3 to 64 (dec)
Vout= (SEL[6:0] × 12.5 mV + 562.5 mV)

The list_voltage returns the vout as
    600mV +  selector * 12.5mV

and so equivalent VSEL is selector + 3.
Adding 3 on selector when configuring VSEL register for
VDDCTRL output.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/regulator/tps65910-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 15b5f1e..8de2835 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -715,7 +715,7 @@ static int tps65910_set_voltage_dcdc(struct regulator_dev *dev,
 		tps65910_reg_write(pmic, TPS65910_VDD2_OP, vsel);
 		break;
 	case TPS65911_REG_VDDCTRL:
-		vsel = selector;
+		vsel = selector + 3;
 		tps65910_reg_write(pmic, TPS65911_VDDCTRL_OP, vsel);
 	}
 
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V1] regulator: tps65910: Configure correct value for VDDCTRL vout reg
  2012-03-07 11:09 [PATCH V1] regulator: tps65910: Configure correct value for VDDCTRL vout reg Laxman Dewangan
@ 2012-03-07 19:30 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-03-07 19:30 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: lrg, linux-kernel, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

On Wed, Mar 07, 2012 at 04:39:05PM +0530, Laxman Dewangan wrote:
> As per datasheet, the voltage output is defined as
> from SEL[6:0] = 3 to 64 (dec)
> Vout= (SEL[6:0] × 12.5 mV + 562.5 mV)

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-07 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-07 11:09 [PATCH V1] regulator: tps65910: Configure correct value for VDDCTRL vout reg Laxman Dewangan
2012-03-07 19:30 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).