Re: DVS regulator drivers
From: Mark Brown
Date: Mon Nov 19 2012 - 20:05:48 EST
On Mon, Nov 19, 2012 at 12:52:09PM +0100, Guennadi Liakhovetski wrote:
> As I mentioned in an earlier mail today [1] I have a difficulty seeing how
> the current regulator API can efficiently be used for DVS-type regulators.
Please don't invent terminology or repurpose existing terminology like
this, it's just confusing - obvious essentially all regulators covered
by the regulator API support voltage scaling which is the usual meaning
of DVS.
> wm831x-dcdc.c handles 2 voltages: "DVS" and "ON." If the new voltage in
> .set_voltage_sel() is equal to one of them, it is just used. If it is a
> new voltage, there's a comment in the driver in
> wm831x_buckv_set_voltage_sel():
> /* Always set the ON status to the minimum voltage */
> but I actually don't see, where the minimum is selected. It seems instead
> in this case the "ON" value is just set:
> ret = wm831x_set_bits(wm831x, on_reg, WM831X_DC1_ON_VSEL_MASK, vsel);
> if (ret < 0)
> return ret;
> dcdc->on_vsel = vsel;
Can you be more specific about your concern here? The above code does
exactly what the comment says, it will set the selector it just picked.
You did spot one bug (I think due to bitrot) which I just fixed but in
general I've just TLDRed this as it's a bit unclear what you're trying
to say here, can you be a bit more concise here? I'm not sure if
there's a general point or if it's specific code issues?
Attachment:
signature.asc
Description: Digital signature