[PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Afzal Mohammed
Count of selector voltage is required for regulator_set_voltage to work via set_voltage_sel. VDD1/2 currently have it as zero, so regulator_set_voltage won't work for VDD1/2 Update count (n_voltages) for VDD1/2 Signed-off-by: Afzal Mohammed af...@ti.com ---

Re: [PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Mark Brown
On Fri, Nov 04, 2011 at 06:18:48PM +0530, Afzal Mohammed wrote: if (i == TPS65910_REG_VDD1 || i == TPS65910_REG_VDD2) { pmic-desc[i].ops = tps65910_ops_dcdc; + pmic-desc[i].n_voltages = VDD1_2_NUM_VOLTS * 3; This looks suspicous - what's

RE: [PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Mohammed, Afzal
Hi Brown, On Fri, Nov 04, 2011 at 19:34:22, Mark Brown wrote: On Fri, Nov 04, 2011 at 06:18:48PM +0530, Afzal Mohammed wrote: if (i == TPS65910_REG_VDD1 || i == TPS65910_REG_VDD2) { pmic-desc[i].ops = tps65910_ops_dcdc; +

Re: [PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Mark Brown
On Fri, Nov 04, 2011 at 02:26:05PM +, Mohammed, Afzal wrote: Hi Brown, Ahem. On Fri, Nov 04, 2011 at 19:34:22, Mark Brown wrote: On Fri, Nov 04, 2011 at 06:18:48PM +0530, Afzal Mohammed wrote: if (i == TPS65910_REG_VDD1 || i == TPS65910_REG_VDD2) {

RE: [PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Mohammed, Afzal
Hi Mark, On Fri, Nov 04, 2011 at 20:55:59, Mark Brown wrote: On Fri, Nov 04, 2011 at 02:26:05PM +, Mohammed, Afzal wrote: Hi Brown, Ahem. I am sorry for that if it offended you, not deliberate, this may have to do with our different cultures, for me it is always a confusion whether I

Re: [PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Mark Brown
On Fri, Nov 04, 2011 at 04:01:04PM +, Mohammed, Afzal wrote: On Fri, Nov 04, 2011 at 20:55:59, Mark Brown wrote: That doesn't really clarify things - the question is why the number of voltages we can set is three times a constant called _NUM_VOLTS? _NUM_VOLTS is the number of voltage

RE: [PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Mohammed, Afzal
Hi Mark, On Fri, Nov 04, 2011 at 21:48:56, Mark Brown wrote: So that definitely seems wrong then - n_voltages is supposed to be the number of voltages that can be selected so if the regulator supports _NUM_VOLTS steps then I'd expect to see that constant used directly. Otherwise I'd suggest

Re: [PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Mark Brown
On Fri, Nov 04, 2011 at 04:32:43PM +, Mohammed, Afzal wrote: On Fri, Nov 04, 2011 at 21:48:56, Mark Brown wrote: So that definitely seems wrong then - n_voltages is supposed to be the number of voltages that can be selected so if the regulator supports _NUM_VOLTS steps then I'd expect

RE: [PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Mohammed, Afzal
Hi Mark, On Fri, Nov 04, 2011 at 22:10:09, Mark Brown wrote: What do you mean when you say gain? Effective voltage expression is (value1 * 12.5mV + 562.5 mV) * value2. In this value2 is being called as gain. value1 can have values from 3 to 75, both inclusive (73 steps) value2 can have

Re: [PATCH 2/2] regulator:TPS65910: VDD1/2 voltage selector count

2011-11-04 Thread Mark Brown
On Fri, Nov 04, 2011 at 04:48:09PM +, Mohammed, Afzal wrote: Effective voltage expression is (value1 * 12.5mV + 562.5 mV) * value2. In this value2 is being called as gain. value1 can have values from 3 to 75, both inclusive (73 steps) value2 can have from 1 to 3, both inclusive (3