Re: [PATCH 2/2] regulator: tps80031: add regulator driver fortps80031

From: Mark Brown
Date: Tue Nov 06 2012 - 03:16:39 EST


On Mon, Nov 05, 2012 at 05:30:02PM +0530, Laxman Dewangan wrote:
> On Monday 05 November 2012 04:12 PM, Mark Brown wrote:

> >Should we be using different versions of the ops depending on the device
> >flags rather than having these switches? It seems like we can't change
> >at runtime and it would make the code a lot simpler.

> I have single dcdc ops for all DCDC VIO, SMPS1 to 3.
> There is different configuration bit for selecting any DCDC to
> normal, extended or offset. As this ops are share, I can not change
> the callbacks.

You can change your code so that it changes the ops it registers
depending on the configuration.

> >Why the + 1 (and - 1 in the get()). I'd expect we can just use the
> >register value directly as a selector.

> The device sets vout = 0 if vsel = 0 and then equation talk about
> the Vmin + vsel * step.
> I exported the Vout minimum as Vmin for sel = 0 and hence this is there.

> I will export this in true equation in my next patch.

You can just have list_voltage() return 0 for this voltage - it's OK to
have missing selector values.

Attachment: signature.asc
Description: Digital signature