diff mbox series

[v11,3/5] dt-bindings: leds: Add LED_FUNCTION_MOONLIGHT definitions

Message ID 1606906011-25633-4-git-send-email-gene.chen.richtek@gmail.com (mailing list archive)
State New, archived
Headers show
Series leds: mt6360: Add LED driver for MT6360 | expand

Commit Message

Gene Chen Dec. 2, 2020, 10:46 a.m. UTC
From: Gene Chen <gene_chen@richtek.com>

Add LED_FUNCTION_MOONLIGHT definitions

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 include/dt-bindings/leds/common.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Pavel Machek Dec. 2, 2020, 12:23 p.m. UTC | #1
On Wed 2020-12-02 18:46:49, Gene Chen wrote:
> From: Gene Chen <gene_chen@richtek.com>
> 
> Add LED_FUNCTION_MOONLIGHT definitions
> 
> Signed-off-by: Gene Chen <gene_chen@richtek.com>
> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Acked-by: Rob Herring <robh@kernel.org>
> ---
>  include/dt-bindings/leds/common.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h
> index 52b619d..843e65d 100644
> --- a/include/dt-bindings/leds/common.h
> +++ b/include/dt-bindings/leds/common.h
> @@ -78,6 +78,7 @@
>  #define LED_FUNCTION_INDICATOR "indicator"
>  #define LED_FUNCTION_LAN "lan"
>  #define LED_FUNCTION_MAIL "mail"
> +#define LED_FUNCTION_MOONLIGHT "moonlight"

There's "torch" function that should be used for this. I guess comment
should be added with explanation what exactly that is and how should
the LED be named.

Best regards,
								Pavel
Gene Chen Dec. 3, 2020, 6:42 a.m. UTC | #2
Pavel Machek <pavel@ucw.cz> 於 2020年12月2日 週三 下午8:23寫道:
>
> On Wed 2020-12-02 18:46:49, Gene Chen wrote:
> > From: Gene Chen <gene_chen@richtek.com>
> >
> > Add LED_FUNCTION_MOONLIGHT definitions
> >
> > Signed-off-by: Gene Chen <gene_chen@richtek.com>
> > Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> > Acked-by: Rob Herring <robh@kernel.org>
> > ---
> >  include/dt-bindings/leds/common.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h
> > index 52b619d..843e65d 100644
> > --- a/include/dt-bindings/leds/common.h
> > +++ b/include/dt-bindings/leds/common.h
> > @@ -78,6 +78,7 @@
> >  #define LED_FUNCTION_INDICATOR "indicator"
> >  #define LED_FUNCTION_LAN "lan"
> >  #define LED_FUNCTION_MAIL "mail"
> > +#define LED_FUNCTION_MOONLIGHT "moonlight"
>
> There's "torch" function that should be used for this. I guess comment
> should be added with explanation what exactly that is and how should
> the LED be named.
>

According to mail, 11/25 "Re: [PATCH v7 2/5] dt-bindings: leds: Add
LED_COLOR_ID_MOONLIGHT definitions",
The Moonlight LED is LED which maximum current more than torch, but
less than flash. Such as front camera fill light.
I think our channel is moonlight, not torch.
I will add this description to comment.
We can't exactly define moonlight current level, because every vendor
has their own specification.

> Best regards,
>                                                                 Pavel
> --
> http://www.livejournal.com/~pavelmachek
Pavel Machek Dec. 3, 2020, 11:40 a.m. UTC | #3
Hi!

> > > +++ b/include/dt-bindings/leds/common.h
> > > @@ -78,6 +78,7 @@
> > >  #define LED_FUNCTION_INDICATOR "indicator"
> > >  #define LED_FUNCTION_LAN "lan"
> > >  #define LED_FUNCTION_MAIL "mail"
> > > +#define LED_FUNCTION_MOONLIGHT "moonlight"
> >
> > There's "torch" function that should be used for this. I guess comment
> > should be added with explanation what exactly that is and how should
> > the LED be named.
> >
> 
> According to mail, 11/25 "Re: [PATCH v7 2/5] dt-bindings: leds: Add
> LED_COLOR_ID_MOONLIGHT definitions",
> The Moonlight LED is LED which maximum current more than torch, but
> less than flash. Such as front camera fill light.
> I think our channel is moonlight, not torch.
> I will add this description to comment.
> We can't exactly define moonlight current level, because every vendor
> has their own specification.

So... what is the timelimit on moonlight?

But if it is used for camera illumination, I believe it should be
simply called flash.

Best regards,

								Pavel
Jacek Anaszewski Dec. 3, 2020, 8:06 p.m. UTC | #4
Hi Pavel,

On 12/3/20 12:40 PM, Pavel Machek wrote:
> Hi!
> 
>>>> +++ b/include/dt-bindings/leds/common.h
>>>> @@ -78,6 +78,7 @@
>>>>   #define LED_FUNCTION_INDICATOR "indicator"
>>>>   #define LED_FUNCTION_LAN "lan"
>>>>   #define LED_FUNCTION_MAIL "mail"
>>>> +#define LED_FUNCTION_MOONLIGHT "moonlight"
>>>
>>> There's "torch" function that should be used for this. I guess comment
>>> should be added with explanation what exactly that is and how should
>>> the LED be named.
>>>
>>
>> According to mail, 11/25 "Re: [PATCH v7 2/5] dt-bindings: leds: Add
>> LED_COLOR_ID_MOONLIGHT definitions",
>> The Moonlight LED is LED which maximum current more than torch, but
>> less than flash. Such as front camera fill light.
>> I think our channel is moonlight, not torch.
>> I will add this description to comment.
>> We can't exactly define moonlight current level, because every vendor
>> has their own specification.
> 
> So... what is the timelimit on moonlight?
> 
> But if it is used for camera illumination, I believe it should be
> simply called flash.

Let's keep FLASH reserved for LED flash class devices.
This device has already two other flash iouts.

Also iouts amperage gives clue that they have three different
functions.
Rob Herring Dec. 9, 2020, 7:53 p.m. UTC | #5
On Thu, Dec 03, 2020 at 09:06:42PM +0100, Jacek Anaszewski wrote:
> Hi Pavel,
> 
> On 12/3/20 12:40 PM, Pavel Machek wrote:
> > Hi!
> > 
> > > > > +++ b/include/dt-bindings/leds/common.h
> > > > > @@ -78,6 +78,7 @@
> > > > >   #define LED_FUNCTION_INDICATOR "indicator"
> > > > >   #define LED_FUNCTION_LAN "lan"
> > > > >   #define LED_FUNCTION_MAIL "mail"
> > > > > +#define LED_FUNCTION_MOONLIGHT "moonlight"
> > > > 
> > > > There's "torch" function that should be used for this. I guess comment
> > > > should be added with explanation what exactly that is and how should
> > > > the LED be named.
> > > > 
> > > 
> > > According to mail, 11/25 "Re: [PATCH v7 2/5] dt-bindings: leds: Add
> > > LED_COLOR_ID_MOONLIGHT definitions",
> > > The Moonlight LED is LED which maximum current more than torch, but
> > > less than flash. Such as front camera fill light.
> > > I think our channel is moonlight, not torch.
> > > I will add this description to comment.
> > > We can't exactly define moonlight current level, because every vendor
> > > has their own specification.
> > 
> > So... what is the timelimit on moonlight?
> > 
> > But if it is used for camera illumination, I believe it should be
> > simply called flash.
> 
> Let's keep FLASH reserved for LED flash class devices.
> This device has already two other flash iouts.
> 
> Also iouts amperage gives clue that they have three different
> functions.

Perhaps there should just be a table of currents and max times rather 
than trying to continually expand this while tied to function.

One could simply want an LED brighter when blinking than steady state 
would allow for.

Rob
diff mbox series

Patch

diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h
index 52b619d..843e65d 100644
--- a/include/dt-bindings/leds/common.h
+++ b/include/dt-bindings/leds/common.h
@@ -78,6 +78,7 @@ 
 #define LED_FUNCTION_INDICATOR "indicator"
 #define LED_FUNCTION_LAN "lan"
 #define LED_FUNCTION_MAIL "mail"
+#define LED_FUNCTION_MOONLIGHT "moonlight"
 #define LED_FUNCTION_MTD "mtd"
 #define LED_FUNCTION_PANIC "panic"
 #define LED_FUNCTION_PROGRAMMING "programming"