Re: [PATCH RFT 1/2] regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo

2012-07-16 Thread Axel Lin
> 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 100 uV, vsel is

Re: [PATCH RFT 1/2] regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo

2012-07-16 Thread Rajendra Nayak
Hi Axel, My apologies for the delay in responding to this one. 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 bec

Re: [PATCH RFT 1/2] regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo

2012-07-15 Thread Mark Brown
On Mon, Jul 09, 2012 at 11:22:31AM +0800, Axel Lin wrote: > 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 100 uV, vsel is 1. Applied both, thanks - even if we need to fix some o

Re: [PATCH RFT 1/2] regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo

2012-07-15 Thread Mark Brown
On Mon, Jul 09, 2012 at 07:01:26PM +0800, Axel Lin wrote: > 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)? Guys, it's pretty concerning that there's

Re: [PATCH RFT 1/2] regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo

2012-07-09 Thread Axel Lin
於 一,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 100 uV, vsel is 1. > It should be 0 in this case. > Fix it by change the equation to: (T

[PATCH RFT 1/2] regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo

2012-07-08 Thread 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 100 uV, vsel is 1. It should be 0 in this case. Fix it by change the equation to: (This equation is common for linear mapping) v