All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] regulator: tps6586x: Fix list minimal voltage setting for LDO0
@ 2012-03-24  1:37 Axel Lin
  2012-03-24  1:38 ` [PATCH 2/4] regulator: Convert tps6586x to get_voltage_sel Axel Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Axel Lin @ 2012-03-24  1:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mike Rapoport, Danny Huang, Liam Girdwood, Mark Brown

According to the datasheet, LDO0 has minimal voltage 1.2V rather than 1.25V.

Table 3-39. VLDO0[2:0] Settings
VLDOx[2:0] VOUT (V) VLDOx[2:0] VOUT (V)
000        1.20     100        2.70
001        1.50     101        2.85
010        1.80     110        3.10
011        2.50     111        3.30

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/tps6586x-regulator.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 29b615c..cfc1f16 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -79,6 +79,11 @@ static int tps6586x_ldo_list_voltage(struct regulator_dev *rdev,
 				     unsigned selector)
 {
 	struct tps6586x_regulator *info = rdev_get_drvdata(rdev);
+	int rid = rdev_get_id(rdev);
+
+	/* LDO0 has minimal voltage 1.2V rather than 1.25V */
+	if ((rid == TPS6586X_ID_LDO_0) && (selector == 0))
+		return (info->voltages[0] - 50) * 1000;
 
 	return info->voltages[selector] * 1000;
 }
-- 
1.7.5.4




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

end of thread, other threads:[~2012-03-26 10:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-24  1:37 [PATCH 1/4] regulator: tps6586x: Fix list minimal voltage setting for LDO0 Axel Lin
2012-03-24  1:38 ` [PATCH 2/4] regulator: Convert tps6586x to get_voltage_sel Axel Lin
2012-03-24  1:42 ` [PATCH 3/4] regulator: Convert tps6586x to set_voltage_sel Axel Lin
2012-03-24  1:44 ` [PATCH 4/4] regulator: Merge tps6586x_regulator_ldo_ops and tps6586x_regulator_dvm_ops Axel Lin
2012-03-26 10:56 ` [PATCH 1/4] regulator: tps6586x: Fix list minimal voltage setting for LDO0 Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.