Message ID | 1605696462-391-3-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 |
Hi! > From: Gene Chen <gene_chen@richtek.com> > > Add LED_COLOR_ID_MOONLIGHT definitions Why is moonlight a color? Camera flashes are usually white, no? At least it needs a comment... Best regards, Pavel > Signed-off-by: Gene Chen <gene_chen@richtek.com> > --- > include/dt-bindings/leds/common.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h > index 52b619d..1409e9a 100644 > --- a/include/dt-bindings/leds/common.h > +++ b/include/dt-bindings/leds/common.h > @@ -33,7 +33,8 @@ > #define LED_COLOR_ID_MULTI 8 /* For multicolor LEDs */ > #define LED_COLOR_ID_RGB 9 /* For multicolor LEDs that can do arbitrary color, > so this would include RGBW and similar */ > -#define LED_COLOR_ID_MAX 10 > +#define LED_COLOR_ID_MOONLIGHT 10 > +#define LED_COLOR_ID_MAX 11 > > /* Standard LED functions */ > /* Keyboard LEDs, usually it would be input4::capslock etc. */
Pavel Machek <pavel@ucw.cz> 於 2020年11月19日 週四 上午5:37寫道: > > Hi! > > > From: Gene Chen <gene_chen@richtek.com> > > > > Add LED_COLOR_ID_MOONLIGHT definitions > > Why is moonlight a color? Camera flashes are usually white, no? > > At least it needs a comment... > > Best regards, > Pavel > Moonlight has more current level(150mA) from general RGB LED (24mA). It can be used as night-light and usually use color AMBER. Camera flashes are usually use two flash LED. One is YELLOW, and one is WHITE. > > > > Signed-off-by: Gene Chen <gene_chen@richtek.com> > > --- > > include/dt-bindings/leds/common.h | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h > > index 52b619d..1409e9a 100644 > > --- a/include/dt-bindings/leds/common.h > > +++ b/include/dt-bindings/leds/common.h > > @@ -33,7 +33,8 @@ > > #define LED_COLOR_ID_MULTI 8 /* For multicolor LEDs */ > > #define LED_COLOR_ID_RGB 9 /* For multicolor LEDs that can do arbitrary color, > > so this would include RGBW and similar */ > > -#define LED_COLOR_ID_MAX 10 > > +#define LED_COLOR_ID_MOONLIGHT 10 > > +#define LED_COLOR_ID_MAX 11 > > > > /* Standard LED functions */ > > /* Keyboard LEDs, usually it would be input4::capslock etc. */ > > -- > http://www.livejournal.com/~pavelmachek
Hi! > > > From: Gene Chen <gene_chen@richtek.com> > > > > > > Add LED_COLOR_ID_MOONLIGHT definitions > > > > Why is moonlight a color? Camera flashes are usually white, no? > > > > At least it needs a comment... > > > > Best regards, > > Pavel > > > > Moonlight has more current level(150mA) from general RGB LED (24mA). > It can be used as night-light and usually use color AMBER. > Camera flashes are usually use two flash LED. One is YELLOW, and one >is WHITE. From what I seen, night-lights are usually differetent "temperatures" of white. Cool white + warm white. I believe "warm white" would be easier to understand than "moonlight"... Best regards, Pavel
Pavel Machek <pavel@ucw.cz> 於 2020年11月19日 週四 下午3:44寫道: > > Hi! > > > > > From: Gene Chen <gene_chen@richtek.com> > > > > > > > > Add LED_COLOR_ID_MOONLIGHT definitions > > > > > > Why is moonlight a color? Camera flashes are usually white, no? > > > > > > At least it needs a comment... > > > > > > Best regards, > > > Pavel > > > > > > > Moonlight has more current level(150mA) from general RGB LED (24mA). > > It can be used as night-light and usually use color AMBER. > > Camera flashes are usually use two flash LED. One is YELLOW, and one > >is WHITE. > > From what I seen, night-lights are usually differetent "temperatures" > of white. Cool white + warm white. > > I believe "warm white" would be easier to understand than > "moonlight"... > ACK, I will change color "LED_COLOR_ID_WHITE" > Best regards, > Pavel > > -- > http://www.livejournal.com/~pavelmachek
Hi! > > > Moonlight has more current level(150mA) from general RGB LED (24mA). > > > It can be used as night-light and usually use color AMBER. > > > Camera flashes are usually use two flash LED. One is YELLOW, and one > > >is WHITE. > > > > From what I seen, night-lights are usually differetent "temperatures" > > of white. Cool white + warm white. > > > > I believe "warm white" would be easier to understand than > > "moonlight"... > > ACK, I will change color "LED_COLOR_ID_WHITE" If you have two leds that differ only in one being "cool white" and one being "warm white", you may need to introduce defines for one of them. If not, keeping "LED_COLOR_ID_WHITE" is enough. Best regards, Pavel
Hi Pavel, Gene, On 11/18/20 10:37 PM, Pavel Machek wrote: > Hi! > >> From: Gene Chen <gene_chen@richtek.com> >> >> Add LED_COLOR_ID_MOONLIGHT definitions > > Why is moonlight a color? Camera flashes are usually white, no? > > At least it needs a comment... That's my fault, In fact I should have asked about adding LED_FUNCTION_MOONLIGHT, it was evidently too late for me that evening...
On Thu 2020-11-19 22:03:14, Jacek Anaszewski wrote: > Hi Pavel, Gene, > > On 11/18/20 10:37 PM, Pavel Machek wrote: > >Hi! > > > >>From: Gene Chen <gene_chen@richtek.com> > >> > >>Add LED_COLOR_ID_MOONLIGHT definitions > > > >Why is moonlight a color? Camera flashes are usually white, no? > > > >At least it needs a comment... > > That's my fault, In fact I should have asked about adding > LED_FUNCTION_MOONLIGHT, it was evidently too late for me that evening... Aha, that makes more sense. But please let's call it "torch" if we do that, as that is already used in kernel sources... and probably in the interface, too: ./arch/arm/mach-pxa/ezx.c: .name = "a910::torch", Best regards, Pavel
On 11/19/20 10:57 PM, Pavel Machek wrote: > On Thu 2020-11-19 22:03:14, Jacek Anaszewski wrote: >> Hi Pavel, Gene, >> >> On 11/18/20 10:37 PM, Pavel Machek wrote: >>> Hi! >>> >>>> From: Gene Chen <gene_chen@richtek.com> >>>> >>>> Add LED_COLOR_ID_MOONLIGHT definitions >>> >>> Why is moonlight a color? Camera flashes are usually white, no? >>> >>> At least it needs a comment... >> >> That's my fault, In fact I should have asked about adding >> LED_FUNCTION_MOONLIGHT, it was evidently too late for me that evening... > > Aha, that makes more sense. > > But please let's call it "torch" if we do that, as that is already > used in kernel sources... and probably in the interface, too: I'd say that torch is something different that moonlight, but we would need more input from Gene to learn more about the nature of light emitted by ML LED on his device. Please note that torch is usually meant as the other mode of flash LED (sometimes it is called "movie mode"), which is already handled by brightness file of LED class flash device (i.e. its LED class subset), and which also maps to v4l2-flash TORCH mode. > ./arch/arm/mach-pxa/ezx.c: .name = "a910::torch", > > Best regards, > Pavel >
Jacek Anaszewski <jacek.anaszewski@gmail.com> 於 2020年11月20日 週五 上午6:26寫道: > > On 11/19/20 10:57 PM, Pavel Machek wrote: > > On Thu 2020-11-19 22:03:14, Jacek Anaszewski wrote: > >> Hi Pavel, Gene, > >> > >> On 11/18/20 10:37 PM, Pavel Machek wrote: > >>> Hi! > >>> > >>>> From: Gene Chen <gene_chen@richtek.com> > >>>> > >>>> Add LED_COLOR_ID_MOONLIGHT definitions > >>> > >>> Why is moonlight a color? Camera flashes are usually white, no? > >>> > >>> At least it needs a comment... > >> > >> That's my fault, In fact I should have asked about adding > >> LED_FUNCTION_MOONLIGHT, it was evidently too late for me that evening... > > > > Aha, that makes more sense. > > > > But please let's call it "torch" if we do that, as that is already > > used in kernel sources... and probably in the interface, too: > > I'd say that torch is something different that moonlight, > but we would need more input from Gene to learn more about > the nature of light emitted by ML LED on his device. > > Please note that torch is usually meant as the other mode of > flash LED (sometimes it is called "movie mode"), which is already > handled by brightness file of LED class flash device (i.e. its LED class > subset), and which also maps to v4l2-flash TORCH mode. > It's used to front camera fill light. More brightness than screen backlight, and more soft light than flash. I think LED_ID_COLOR_WHITE is okay. > > ./arch/arm/mach-pxa/ezx.c: .name = "a910::torch", > > > > Best regards, > > Pavel > > > > -- > Best regards, > Jacek Anaszewski
On 11/23/20 4:00 AM, Gene Chen wrote: > Jacek Anaszewski <jacek.anaszewski@gmail.com> 於 2020年11月20日 週五 上午6:26寫道: >> >> On 11/19/20 10:57 PM, Pavel Machek wrote: >>> On Thu 2020-11-19 22:03:14, Jacek Anaszewski wrote: >>>> Hi Pavel, Gene, >>>> >>>> On 11/18/20 10:37 PM, Pavel Machek wrote: >>>>> Hi! >>>>> >>>>>> From: Gene Chen <gene_chen@richtek.com> >>>>>> >>>>>> Add LED_COLOR_ID_MOONLIGHT definitions >>>>> >>>>> Why is moonlight a color? Camera flashes are usually white, no? >>>>> >>>>> At least it needs a comment... >>>> >>>> That's my fault, In fact I should have asked about adding >>>> LED_FUNCTION_MOONLIGHT, it was evidently too late for me that evening... >>> >>> Aha, that makes more sense. >>> >>> But please let's call it "torch" if we do that, as that is already >>> used in kernel sources... and probably in the interface, too: >> >> I'd say that torch is something different that moonlight, >> but we would need more input from Gene to learn more about >> the nature of light emitted by ML LED on his device. >> >> Please note that torch is usually meant as the other mode of >> flash LED (sometimes it is called "movie mode"), which is already >> handled by brightness file of LED class flash device (i.e. its LED class >> subset), and which also maps to v4l2-flash TORCH mode. >> > > It's used to front camera fill light. > More brightness than screen backlight, and more soft light than flash. > I think LED_ID_COLOR_WHITE is okay. So why in v6 you assigned LED_COLOR_ID_AMBER to it? Regardless of that, now we're talking about LED function - you chose LED_FUNCTION_INDICATOR for it, but inferring from your above description - it certainly doesn't fit here. Also register names, containing part "ML" indicate that this LED's intended function is moonlinght, which your description somehow corroborates. Moonlight LEDs become ubiquitous nowadays so sooner or later we will need to add this function anyway [0]. [0] https://landscapelightingoakville.com/what-is-moon-lighting-and-why-does-it-remain-so-popular/
Jacek Anaszewski <jacek.anaszewski@gmail.com> 於 2020年11月24日 週二 上午4:52寫道: > > On 11/23/20 4:00 AM, Gene Chen wrote: > > Jacek Anaszewski <jacek.anaszewski@gmail.com> 於 2020年11月20日 週五 上午6:26寫道: > >> > >> On 11/19/20 10:57 PM, Pavel Machek wrote: > >>> On Thu 2020-11-19 22:03:14, Jacek Anaszewski wrote: > >>>> Hi Pavel, Gene, > >>>> > >>>> On 11/18/20 10:37 PM, Pavel Machek wrote: > >>>>> Hi! > >>>>> > >>>>>> From: Gene Chen <gene_chen@richtek.com> > >>>>>> > >>>>>> Add LED_COLOR_ID_MOONLIGHT definitions > >>>>> > >>>>> Why is moonlight a color? Camera flashes are usually white, no? > >>>>> > >>>>> At least it needs a comment... > >>>> > >>>> That's my fault, In fact I should have asked about adding > >>>> LED_FUNCTION_MOONLIGHT, it was evidently too late for me that evening... > >>> > >>> Aha, that makes more sense. > >>> > >>> But please let's call it "torch" if we do that, as that is already > >>> used in kernel sources... and probably in the interface, too: > >> > >> I'd say that torch is something different that moonlight, > >> but we would need more input from Gene to learn more about > >> the nature of light emitted by ML LED on his device. > >> > >> Please note that torch is usually meant as the other mode of > >> flash LED (sometimes it is called "movie mode"), which is already > >> handled by brightness file of LED class flash device (i.e. its LED class > >> subset), and which also maps to v4l2-flash TORCH mode. > >> > > > > It's used to front camera fill light. > > More brightness than screen backlight, and more soft light than flash. > > I think LED_ID_COLOR_WHITE is okay. > > So why in v6 you assigned LED_COLOR_ID_AMBER to it? > > Regardless of that, now we're talking about LED function - you chose > LED_FUNCTION_INDICATOR for it, but inferring from your above description > - it certainly doesn't fit here. > > Also register names, containing part "ML" indicate that this LED's > intended function is moonlinght, which your description somehow > corroborates. > > Moonlight LEDs become ubiquitous nowadays so sooner or later we will > need to add this function anyway [0]. > > [0] > https://landscapelightingoakville.com/what-is-moon-lighting-and-why-does-it-remain-so-popular/ > We use term "Moonlight" as reference says "When you are trying to imitate moonlight you need to use low voltage, softer lighting. You don’t want something that’s too bright" which is focus on brightness instead of color. So we surpose Moonlight can be white or amber. Should I add LED_FUNCTION_MOONLIGHT and set LED_COLOR_ID_WHITE? > -- > Best regards, > Jacek Anaszewski
Fix Typo. Gene Chen <gene.chen.richtek@gmail.com> 於 2020年11月24日 週二 下午3:33寫道: > > Jacek Anaszewski <jacek.anaszewski@gmail.com> 於 2020年11月24日 週二 上午4:52寫道: > > > > On 11/23/20 4:00 AM, Gene Chen wrote: > > > Jacek Anaszewski <jacek.anaszewski@gmail.com> 於 2020年11月20日 週五 上午6:26寫道: > > >> > > >> On 11/19/20 10:57 PM, Pavel Machek wrote: > > >>> On Thu 2020-11-19 22:03:14, Jacek Anaszewski wrote: > > >>>> Hi Pavel, Gene, > > >>>> > > >>>> On 11/18/20 10:37 PM, Pavel Machek wrote: > > >>>>> Hi! > > >>>>> > > >>>>>> From: Gene Chen <gene_chen@richtek.com> > > >>>>>> > > >>>>>> Add LED_COLOR_ID_MOONLIGHT definitions > > >>>>> > > >>>>> Why is moonlight a color? Camera flashes are usually white, no? > > >>>>> > > >>>>> At least it needs a comment... > > >>>> > > >>>> That's my fault, In fact I should have asked about adding > > >>>> LED_FUNCTION_MOONLIGHT, it was evidently too late for me that evening... > > >>> > > >>> Aha, that makes more sense. > > >>> > > >>> But please let's call it "torch" if we do that, as that is already > > >>> used in kernel sources... and probably in the interface, too: > > >> > > >> I'd say that torch is something different that moonlight, > > >> but we would need more input from Gene to learn more about > > >> the nature of light emitted by ML LED on his device. > > >> > > >> Please note that torch is usually meant as the other mode of > > >> flash LED (sometimes it is called "movie mode"), which is already > > >> handled by brightness file of LED class flash device (i.e. its LED class > > >> subset), and which also maps to v4l2-flash TORCH mode. > > >> > > > > > > It's used to front camera fill light. > > > More brightness than screen backlight, and more soft light than flash. > > > I think LED_ID_COLOR_WHITE is okay. > > > > So why in v6 you assigned LED_COLOR_ID_AMBER to it? > > we suppose Moonlight can be white or amber. > > Regardless of that, now we're talking about LED function - you chose > > LED_FUNCTION_INDICATOR for it, but inferring from your above description > > - it certainly doesn't fit here. > > > > Also register names, containing part "ML" indicate that this LED's > > intended function is moonlinght, which your description somehow > > corroborates. > > > > Moonlight LEDs become ubiquitous nowadays so sooner or later we will > > need to add this function anyway [0]. > > > > [0] > > https://landscapelightingoakville.com/what-is-moon-lighting-and-why-does-it-remain-so-popular/ > > > > According to reference, > "When you are trying to imitate moonlight you need to use low voltage, > softer lighting. You don’t want something that’s too bright" > which is focus on brightness instead of color. > > So we suppose Moonlight can be white or amber. > > Should I add LED_FUNCTION_MOONLIGHT and set LED_COLOR_ID_WHITE? > > > -- > > Best regards, > > Jacek Anaszewski
On 11/24/20 8:33 AM, Gene Chen wrote: > Jacek Anaszewski <jacek.anaszewski@gmail.com> 於 2020年11月24日 週二 上午4:52寫道: >> >> On 11/23/20 4:00 AM, Gene Chen wrote: >>> Jacek Anaszewski <jacek.anaszewski@gmail.com> 於 2020年11月20日 週五 上午6:26寫道: >>>> >>>> On 11/19/20 10:57 PM, Pavel Machek wrote: >>>>> On Thu 2020-11-19 22:03:14, Jacek Anaszewski wrote: >>>>>> Hi Pavel, Gene, >>>>>> >>>>>> On 11/18/20 10:37 PM, Pavel Machek wrote: >>>>>>> Hi! >>>>>>> >>>>>>>> From: Gene Chen <gene_chen@richtek.com> >>>>>>>> >>>>>>>> Add LED_COLOR_ID_MOONLIGHT definitions >>>>>>> >>>>>>> Why is moonlight a color? Camera flashes are usually white, no? >>>>>>> >>>>>>> At least it needs a comment... >>>>>> >>>>>> That's my fault, In fact I should have asked about adding >>>>>> LED_FUNCTION_MOONLIGHT, it was evidently too late for me that evening... >>>>> >>>>> Aha, that makes more sense. >>>>> >>>>> But please let's call it "torch" if we do that, as that is already >>>>> used in kernel sources... and probably in the interface, too: >>>> >>>> I'd say that torch is something different that moonlight, >>>> but we would need more input from Gene to learn more about >>>> the nature of light emitted by ML LED on his device. >>>> >>>> Please note that torch is usually meant as the other mode of >>>> flash LED (sometimes it is called "movie mode"), which is already >>>> handled by brightness file of LED class flash device (i.e. its LED class >>>> subset), and which also maps to v4l2-flash TORCH mode. >>>> >>> >>> It's used to front camera fill light. >>> More brightness than screen backlight, and more soft light than flash. >>> I think LED_ID_COLOR_WHITE is okay. >> >> So why in v6 you assigned LED_COLOR_ID_AMBER to it? >> >> Regardless of that, now we're talking about LED function - you chose >> LED_FUNCTION_INDICATOR for it, but inferring from your above description >> - it certainly doesn't fit here. >> >> Also register names, containing part "ML" indicate that this LED's >> intended function is moonlinght, which your description somehow >> corroborates. >> >> Moonlight LEDs become ubiquitous nowadays so sooner or later we will >> need to add this function anyway [0]. >> >> [0] >> https://landscapelightingoakville.com/what-is-moon-lighting-and-why-does-it-remain-so-popular/ >> > > We use term "Moonlight" as reference says > "When you are trying to imitate moonlight you need to use low voltage, > softer lighting. You don’t want something that’s too bright" > which is focus on brightness instead of color. > > So we surpose Moonlight can be white or amber. > > Should I add LED_FUNCTION_MOONLIGHT and set LED_COLOR_ID_WHITE? Regarding the function - yes, the reference backs that up. Regarding the color - if you feel that it properly describes the LED color then go for it.
diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h index 52b619d..1409e9a 100644 --- a/include/dt-bindings/leds/common.h +++ b/include/dt-bindings/leds/common.h @@ -33,7 +33,8 @@ #define LED_COLOR_ID_MULTI 8 /* For multicolor LEDs */ #define LED_COLOR_ID_RGB 9 /* For multicolor LEDs that can do arbitrary color, so this would include RGBW and similar */ -#define LED_COLOR_ID_MAX 10 +#define LED_COLOR_ID_MOONLIGHT 10 +#define LED_COLOR_ID_MAX 11 /* Standard LED functions */ /* Keyboard LEDs, usually it would be input4::capslock etc. */