lkml.org 
[lkml]   [2011]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] backlight: add regulator support for platform_lcd driver
From
Hi Felipe,

On 5 December 2011 14:22, Felipe Balbi <balbi@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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-12-05 10:17    [W:0.058 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site