[PATCH] backlight: add regulator support for platform_lcd driver
Thomas Abraham
thomas.abraham at linaro.org
Mon Dec 5 04:14:14 EST 2011
Hi Felipe,
On 5 December 2011 14:22, Felipe Balbi <balbi at ti.com> wrote:
[...]
>> + if (lcd_power) {
>> + if (plcd->pdata->min_uV || plcd->pdata->max_uV)
>> + if (regulator_set_voltage(lcd_regulator,
>> + plcd->pdata->min_uV, plcd->pdata->max_uV))
>> + dev_info(plcd->us,
>> + "regulator voltage set failed\n");
>> +
>> + if (regulator_enable(lcd_regulator))
>> + dev_info(plcd->us, "failed to enable regulator\n");
>> + } else {
>> + regulator_disable(lcd_regulator);
>> + }
>> +
>> + regulator_put(lcd_regulator);
>
> I wonder why you ->get() and ->put() everytime here. Wouldn't it be
> enough to ->get() on probe() and ->put() on remove() ??
Thanks for the suggestion. It would be simpler if done in probe. I
will redo this patch.
Regards,
Thomas.
>
> --
> balbi
>
More information about the linux-arm-kernel
mailing list