[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1366341289.18636.2.camel@phoenix>
Date: Fri, 19 Apr 2013 11:14:49 +0800
From: Axel Lin <axel.lin@...ics.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Laxman Dewangan <ldewangan@...dia.com>,
Graeme Gregory <gg@...mlogic.co.uk>,
Liam Girdwood <lgirdwood@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH RFT] regulator: palmas: Remove wrong voltage setting for
enabling LDO8 tracking mode
When SMPS45 is set to off and LDO8 tracking is enabled, LDO8 output can be set
from 0.45 to 1.65V and the steps of voltage change is 25mV.
This is done by setting:
pmic->desc[id].min_uV = 450000;
pmic->desc[id].uV_step = 25000;
I don't see the point of reading vsel register, multiple the register value by
2 and then write back to the register.
Signed-off-by: Axel Lin <axel.lin@...ics.com>
---
Hi Laxman,
Current code looks strange (and wrong) to me.
I don't see the point of reading vsel register, multiple the register value by
2 and then write back to the register.
Can you double check this patch, in case I might misunderstand the code.
Thanks,
Axel
drivers/regulator/palmas-regulator.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 67ed5e5d..f26344e 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -643,24 +643,6 @@ static void palmas_enable_ldo8_track(struct palmas *palmas)
dev_err(palmas->dev, "Error in enabling tracking mode\n");
return;
}
- /*
- * When SMPS45 is set to off and LDO8 tracking is enabled, the LDO8
- * output is defined by the LDO8_VOLTAGE.VSEL register divided by two,
- * and can be set from 0.45 to 1.65 V.
- */
- addr = palmas_regs_info[PALMAS_REG_LDO8].vsel_addr;
- ret = palmas_ldo_read(palmas, addr, ®);
- if (ret) {
- dev_err(palmas->dev, "Error in reading ldo8 voltage reg\n");
- return;
- }
-
- reg = (reg << 1) & PALMAS_LDO8_VOLTAGE_VSEL_MASK;
- ret = palmas_ldo_write(palmas, addr, reg);
- if (ret < 0)
- dev_err(palmas->dev, "Error in setting ldo8 voltage reg\n");
-
- return;
}
static struct of_regulator_match palmas_matches[] = {
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists