Re: [PATCH RFT 1/2] regulator: twl: Fix the formula to calculatevsel and voltage for twl6030ldo
From: Axel Lin
Date: Mon Jul 16 2012 - 06:20:38 EST
> On Monday 09 July 2012 04:31 PM, Axel Lin wrote:
> > æ äï2012-07-09 æ 11:22 +0800ïAxel Lin æåï
> >> In twl6030ldo_set_voltage, current code use below formula to calculate vsel:
> >> vsel = (min_uV/1000 - 1000)/100 + 1;
> >> This is worng because when min_uV is 1000000 uV, vsel is 1.
> >> It should be 0 in this case.
> Why? Do you know of any documentation which states this?
I double check with the datasheet again now.
You are right in this. So we cannot use linear mapping for
I'm going to send a patch to fix it, I'd appreciate if someone can
review and test it.
> > I found a problem that before commit 3e3d3be79c, the voltage tables were
> > not linear mapping. So why we can convert these voltage mapping table to
> > Voltage(in mV) = 1000mv + 100mv * (vsel - 1)?
> > Did I miss something?
> All voltage tables before commit '3e3d3be79c' for twl6030 regulators
> were clearly wrong. They assumed similarity with twl4030 regulators
> which was not right.
Good to know that.
> > Regards,
> > Axel
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/