Re: [PATCH RFT] regulator: palmas: Remove wrong voltage setting forenabling LDO8 tracking mode

From: Laxman Dewangan
Date: Fri Apr 19 2013 - 00:53:47 EST


On Friday 19 April 2013 08:44 AM, Axel Lin wrote:
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@xxxxxxxxxx>
---
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.

When we configure for tracking mode, the equation of voltage out put change:
Vnt = 0.9 + reg*0.05
to
Vt = 0.45 + reg*0.025

So we need to adjust the current register setting to have the same voltage output when smps45 is OFF.

But however, just doubling the register content is not suffice here. I did math again and it should be

reg = reg << 2 + 18.

+18 because we need to adjust the Vmin also (18 * 0.25 = 0.45).
So here we need to fix this.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/