Re: [PATCH RFT 3/4] regulator: wm831x-dcdc: Convert wm831x_buckv_ops to set_voltage_sel and map_voltage

Axel Lin
2012-06-13T11:41:48Z

2012/6/13 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Tue, Jun 12, 2012 at 10:23:09AM +0800, Axel Lin wrote:
>> Signed-off-by: Axel Lin <axel.lin@gmail.com>
>
> This patch is way more invasive than it needs to be (and therefore hard
> to check) because
>
>> -     if (dcdc->dvs_gpio && dcdc->on_vsel == vsel)
>> +     if (dcdc->dvs_gpio && dcdc->on_vsel == selector)
>
> you've replaced vsel with selector throughout the code.

Sorry. I don't get it.

In wm831x_buckv_set_voltage(), we call
wm831x_buckv_select_min_voltage() to get the selector ( named vsel).

In this patch, now we convert to set_voltage_sel:

static int wm831x_buckv_set_voltage_sel(struct regulator_dev *rdev,
unsigned selector)

So the selector now named 'selector'.

Or do you prefer I chenge the prototype to:

static int wm831x_buckv_set_voltage_sel(struct regulator_dev *rdev,
unsigned vsel)

Then the diff can be smaller.

Regards,
Axel