lkml.org 
[lkml]   [2012]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] leds: lm3530: fix handling of already enabled regulators
2012/4/23 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Sun, Apr 22, 2012 at 11:11:48PM +0800, Axel Lin wrote:
>
>>               drvdata->regulator = NULL;
>>               goto err_regulator_get;
>>       }
>> +     drvdata->enable = regulator_is_enabled(drvdata->regulator);
>>
>
> This isn't sufficient for what the driver is doing - it also needs to
> enable the regulator.  Regulator enables are reference counted (since
> the regulator can be shared by many device supplies) so if this driver
> doesn't reference the regulator when it's needed then it could get
> powered off.

The regulator_enable() is called in lm3530_init_registers().

>
> If this regulator is the actual LED then the current default of assuming
> the regulator is off on boot isn't ideal either as it means that if the
> regulator is enabled on boot then the LED may be left on even though the
> driver thinks it's off.

Hi Shreshtha,
I think without this patch you can see the symptom Mark mentioned if the
regulator is enabled on boot.
Any chance to test if this patch works or not?

Regards,
Axel
--
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: 2012-04-24 04:11    [W:1.986 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site