Re: [PATCH v7 12/12] led: bd71828: Support LED outputs on ROHM BD71828 PMIC
From: Vaittinen, Matti
Date: Fri Dec 27 2019 - 04:44:37 EST
On Sat, 2019-12-21 at 20:48 +0100, Pavel Machek wrote:
> Hi!
>
> > ROHM BD71828 power management IC has two LED outputs for charge
> > status
> > and button pressing indications. The LED outputs can also be forced
> > by SW so add driver allowing to use these LEDs for other
> > indications
> > as well.
> >
> > Leds are controlled by SW using 'Force ON' bits. Please note the
> > constrains mentioned in data-sheet:
> > 1. If one LED is forced ON - then also the other LED is forced.
> > => You can't use SW control to force ON one LED and
> > allow HW
> > to control the other.
> > 2. You can't force both LEDs OFF. If the FORCE bit for both
> > LED's is
> > zero, then LEDs are controlled by HW and indicate
> > button/charger
> > states as explained in data-sheet.
>
> That's really quite sad, is it?
>
> All the effort and all we got is ... one working LED. Because
> hardware
> does not allow you to control both LEDs...
Yes and no. I do fully agree that it would be much nicer if the LEDs
could be set to be fully controlled by SW. OTOH, knowing the LEDs are
usually OFF, using them to indicate something else is still doable. I
think you know typical LED use-cases better than I do - but I guess
that some blink pattern in order to indicate errors is well doable with
these LEDs.
> ...and we don't even have support selecting if the LED should be sw
> or
> hw controlled in the mainline, yet...
Which sounds like we have such support somewhere - and hopefully in
mainline one day ;)
Anyways, Thanks for taking a look at this! :)
Br,
Matti Vaittinen