linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] leds: add orange color
@ 2020-07-23 12:57 Marek Behún
  2020-07-23 13:40 ` Dan Murphy
  2020-07-23 19:39 ` Pavel Machek
  0 siblings, 2 replies; 16+ messages in thread
From: Marek Behún @ 2020-07-23 12:57 UTC (permalink / raw)
  To: linux-leds; +Cc: Pavel Machek, jacek.anaszewski, Dan Murphy, Marek Behún

Many network devices have LEDs with green and orange color, instead of
green and yellow.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 drivers/leds/led-core.c           | 1 +
 include/dt-bindings/leds/common.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
index 846248a0693d..6503d0d66fc6 100644
--- a/drivers/leds/led-core.c
+++ b/drivers/leds/led-core.c
@@ -35,6 +35,7 @@ const char * const led_colors[LED_COLOR_ID_MAX] = {
 	[LED_COLOR_ID_YELLOW] = "yellow",
 	[LED_COLOR_ID_IR] = "ir",
 	[LED_COLOR_ID_MULTI] = "multicolor",
+	[LED_COLOR_ID_ORANGE] = "orange",
 };
 EXPORT_SYMBOL_GPL(led_colors);
 
diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h
index a463ce6a8794..28b00ecc4645 100644
--- a/include/dt-bindings/leds/common.h
+++ b/include/dt-bindings/leds/common.h
@@ -31,7 +31,8 @@
 #define LED_COLOR_ID_YELLOW	6
 #define LED_COLOR_ID_IR		7
 #define LED_COLOR_ID_MULTI	8
-#define LED_COLOR_ID_MAX	9
+#define LED_COLOR_ID_ORANGE	9
+#define LED_COLOR_ID_MAX	10
 
 /* Standard LED functions */
 /* Keyboard LEDs, usually it would be input4::capslock etc. */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 12:57 [PATCH] leds: add orange color Marek Behún
@ 2020-07-23 13:40 ` Dan Murphy
  2020-07-23 13:47   ` Marek Behún
  2020-07-23 19:39 ` Pavel Machek
  1 sibling, 1 reply; 16+ messages in thread
From: Dan Murphy @ 2020-07-23 13:40 UTC (permalink / raw)
  To: Marek Behún, linux-leds; +Cc: Pavel Machek, jacek.anaszewski

Marek

On 7/23/20 7:57 AM, Marek Behún wrote:
> Many network devices have LEDs with green and orange color, instead of
> green and yellow.

Can't we use amber?

Dan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 13:40 ` Dan Murphy
@ 2020-07-23 13:47   ` Marek Behún
  2020-07-23 14:23     ` Dan Murphy
  0 siblings, 1 reply; 16+ messages in thread
From: Marek Behún @ 2020-07-23 13:47 UTC (permalink / raw)
  To: Dan Murphy; +Cc: linux-leds, Pavel Machek, jacek.anaszewski

On Thu, 23 Jul 2020 08:40:09 -0500
Dan Murphy <dmurphy@ti.com> wrote:

> Marek
> 
> On 7/23/20 7:57 AM, Marek Behún wrote:
> > Many network devices have LEDs with green and orange color, instead
> > of green and yellow.  
> 
> Can't we use amber?
> 
> Dan
> 

:D

Dan
1. amber is different from orange (according to wikipedia)
2. many technical people know the names of at most 12 different colors,
   amber is not among them
3. i can't even find the translation of amber to slovak language :D
4. are you trolling me? :D

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 13:47   ` Marek Behún
@ 2020-07-23 14:23     ` Dan Murphy
  0 siblings, 0 replies; 16+ messages in thread
From: Dan Murphy @ 2020-07-23 14:23 UTC (permalink / raw)
  To: Marek Behún; +Cc: linux-leds, Pavel Machek, jacek.anaszewski

Marek

On 7/23/20 8:47 AM, Marek Behún wrote:
> On Thu, 23 Jul 2020 08:40:09 -0500
> Dan Murphy<dmurphy@ti.com>  wrote:
>
>> Marek
>>
>> On 7/23/20 7:57 AM, Marek Behún wrote:
>>> Many network devices have LEDs with green and orange color, instead
>>> of green and yellow.
>> Can't we use amber?
>>
>> Dan
>>
> :D
>
> Dan
> 1. amber is different from orange (according to wikipedia)
> 2. many technical people know the names of at most 12 different colors,
>     amber is not among them
> 3. i can't even find the translation of amber to slovak language :D
> 4. are you trolling me? :D

Yes I know that by definition amber is different from orange.  It might 
be better to add the other 6 colors too.

And I found the Slovak translation for amber "jantárový" here 
https://glosbe.com/en/sk/amber ;)

Trolling, no, just wanted to know why amber could not be used. Seemed 
like a relevant question to me.

Dan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 12:57 [PATCH] leds: add orange color Marek Behún
  2020-07-23 13:40 ` Dan Murphy
@ 2020-07-23 19:39 ` Pavel Machek
  2020-07-23 20:09   ` Jacek Anaszewski
  1 sibling, 1 reply; 16+ messages in thread
From: Pavel Machek @ 2020-07-23 19:39 UTC (permalink / raw)
  To: Marek Behún; +Cc: linux-leds, jacek.anaszewski, Dan Murphy

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

Hi!

> Many network devices have LEDs with green and orange color, instead of
> green and yellow.

Is it likely that we see device having both yellow and orange LEDs?

I'd simply lie and say those LEDs are yellow...

Because... there are lots of LED colours available, including pink,
various shades of blue, ...

https://www.gme.cz/led-5mm-pink-3800-60-504brc2z-p2f

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 19:39 ` Pavel Machek
@ 2020-07-23 20:09   ` Jacek Anaszewski
  2020-07-23 20:11     ` Jacek Anaszewski
  0 siblings, 1 reply; 16+ messages in thread
From: Jacek Anaszewski @ 2020-07-23 20:09 UTC (permalink / raw)
  To: Pavel Machek, Marek Behún; +Cc: linux-leds, Dan Murphy

Hi Pavel,

On 7/23/20 9:39 PM, Pavel Machek wrote:
> Hi!
> 
>> Many network devices have LEDs with green and orange color, instead of
>> green and yellow.
> 
> Is it likely that we see device having both yellow and orange LEDs?

Why should we?

> I'd simply lie and say those LEDs are yellow...
> 
> Because... there are lots of LED colours available, including pink,
> various shades of blue, ...
> 
> https://www.gme.cz/led-5mm-pink-3800-60-504brc2z-p2f

I see also "oranžová" there :-)

And see below:

https://www.pcboard.ca/5mm-super-bright-orange.html

I've found also other examples.

-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 20:09   ` Jacek Anaszewski
@ 2020-07-23 20:11     ` Jacek Anaszewski
  2020-07-23 20:16       ` Pavel Machek
  0 siblings, 1 reply; 16+ messages in thread
From: Jacek Anaszewski @ 2020-07-23 20:11 UTC (permalink / raw)
  To: Pavel Machek, Marek Behún; +Cc: linux-leds, Dan Murphy

On 7/23/20 10:09 PM, Jacek Anaszewski wrote:
> Hi Pavel,
> 
> On 7/23/20 9:39 PM, Pavel Machek wrote:
>> Hi!
>>
>>> Many network devices have LEDs with green and orange color, instead of
>>> green and yellow.
>>
>> Is it likely that we see device having both yellow and orange LEDs?
> 
> Why should we?

This question actually refers to the below sentence...

>> I'd simply lie and say those LEDs are yellow...

So, why do you think we should strive to limit the number
of color definitions?

>> Because... there are lots of LED colours available, including pink,
>> various shades of blue, ...
>>
>> https://www.gme.cz/led-5mm-pink-3800-60-504brc2z-p2f
> 
> I see also "oranžová" there :-)
> 
> And see below:
> 
> https://www.pcboard.ca/5mm-super-bright-orange.html
> 
> I've found also other examples.
> 

-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 20:11     ` Jacek Anaszewski
@ 2020-07-23 20:16       ` Pavel Machek
  2020-07-23 20:31         ` Jacek Anaszewski
  0 siblings, 1 reply; 16+ messages in thread
From: Pavel Machek @ 2020-07-23 20:16 UTC (permalink / raw)
  To: Jacek Anaszewski; +Cc: Marek Behún, linux-leds, Dan Murphy

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

Hi!

> > > > Many network devices have LEDs with green and orange color, instead of
> > > > green and yellow.
> > > 
> > > Is it likely that we see device having both yellow and orange LEDs?
> > 
> > Why should we?
> 
> This question actually refers to the below sentence...
> 
> > > I'd simply lie and say those LEDs are yellow...
> 
> So, why do you think we should strive to limit the number
> of color definitions?

Because there's infinitely many colors :-). And programmers are bad at
differentiating them. You can't really tell wavelength of light by
looking at it.

I mean.. yes, maybe we can add orange, pink, green-blue, violet,
... white at different temperatures ...

It will be rather long list.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 20:16       ` Pavel Machek
@ 2020-07-23 20:31         ` Jacek Anaszewski
  2020-07-23 20:39           ` Pavel Machek
  0 siblings, 1 reply; 16+ messages in thread
From: Jacek Anaszewski @ 2020-07-23 20:31 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Marek Behún, linux-leds, Dan Murphy

On 7/23/20 10:16 PM, Pavel Machek wrote:
> Hi!
> 
>>>>> Many network devices have LEDs with green and orange color, instead of
>>>>> green and yellow.
>>>>
>>>> Is it likely that we see device having both yellow and orange LEDs?
>>>
>>> Why should we?
>>
>> This question actually refers to the below sentence...
>>
>>>> I'd simply lie and say those LEDs are yellow...
>>
>> So, why do you think we should strive to limit the number
>> of color definitions?
> 
> Because there's infinitely many colors :-). And programmers are bad at
> differentiating them. You can't really tell wavelength of light by
> looking at it.
> 
> I mean.. yes, maybe we can add orange, pink, green-blue, violet,
> ... white at different temperatures ...
> 
> It will be rather long list.

I think that we should allow setting the LED color name after
what manufacturer claims it is.

-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 20:31         ` Jacek Anaszewski
@ 2020-07-23 20:39           ` Pavel Machek
  2020-07-23 20:54             ` Dan Murphy
  2020-07-23 20:57             ` Jacek Anaszewski
  0 siblings, 2 replies; 16+ messages in thread
From: Pavel Machek @ 2020-07-23 20:39 UTC (permalink / raw)
  To: Jacek Anaszewski; +Cc: Marek Behún, linux-leds, Dan Murphy

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

Hi!

> > > > > > Many network devices have LEDs with green and orange color, instead of
> > > > > > green and yellow.
> > > > > 
> > > > > Is it likely that we see device having both yellow and orange LEDs?
> > > > 
> > > > Why should we?
> > > 
> > > This question actually refers to the below sentence...
> > > 
> > > > > I'd simply lie and say those LEDs are yellow...
> > > 
> > > So, why do you think we should strive to limit the number
> > > of color definitions?
> > 
> > Because there's infinitely many colors :-). And programmers are bad at
> > differentiating them. You can't really tell wavelength of light by
> > looking at it.
> > 
> > I mean.. yes, maybe we can add orange, pink, green-blue, violet,
> > ... white at different temperatures ...
> > 
> > It will be rather long list.
> 
> I think that we should allow setting the LED color name after
> what manufacturer claims it is.

Well, someone can try to compile list of common colors, and convince
me that this list is good enough...

...but really, unless there's device where there are leds of
yellow/orange color... it may be easier to keep the current list.

IOW "are we solving real problem by introducing orange color"?

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 20:39           ` Pavel Machek
@ 2020-07-23 20:54             ` Dan Murphy
  2020-07-23 20:57             ` Jacek Anaszewski
  1 sibling, 0 replies; 16+ messages in thread
From: Dan Murphy @ 2020-07-23 20:54 UTC (permalink / raw)
  To: Pavel Machek, Jacek Anaszewski; +Cc: Marek Behún, linux-leds

Hi

On 7/23/20 3:39 PM, Pavel Machek wrote:
> Hi!
>
>>>>>>> Many network devices have LEDs with green and orange color, instead of
>>>>>>> green and yellow.
>>>>>> Is it likely that we see device having both yellow and orange LEDs?
>>>>> Why should we?
>>>> This question actually refers to the below sentence...
>>>>
>>>>>> I'd simply lie and say those LEDs are yellow...
>>>> So, why do you think we should strive to limit the number
>>>> of color definitions?
>>> Because there's infinitely many colors :-). And programmers are bad at
>>> differentiating them. You can't really tell wavelength of light by
>>> looking at it.
>>>
>>> I mean.. yes, maybe we can add orange, pink, green-blue, violet,
>>> ... white at different temperatures ...
>>>
>>> It will be rather long list.
>> I think that we should allow setting the LED color name after
>> what manufacturer claims it is.
> Well, someone can try to compile list of common colors, and convince
> me that this list is good enough...
>
> ...but really, unless there's device where there are leds of
> yellow/orange color... it may be easier to keep the current list.

Marek indicated in his response to me that

2. many technical people know the names of at most 12 different colors,
    amber is not among them

So maybe he can put the list together.

Dan


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 20:39           ` Pavel Machek
  2020-07-23 20:54             ` Dan Murphy
@ 2020-07-23 20:57             ` Jacek Anaszewski
  2020-07-23 21:04               ` Pavel Machek
  1 sibling, 1 reply; 16+ messages in thread
From: Jacek Anaszewski @ 2020-07-23 20:57 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Marek Behún, linux-leds, Dan Murphy

On 7/23/20 10:39 PM, Pavel Machek wrote:
> Hi!
> 
>>>>>>> Many network devices have LEDs with green and orange color, instead of
>>>>>>> green and yellow.
>>>>>>
>>>>>> Is it likely that we see device having both yellow and orange LEDs?
>>>>>
>>>>> Why should we?
>>>>
>>>> This question actually refers to the below sentence...
>>>>
>>>>>> I'd simply lie and say those LEDs are yellow...
>>>>
>>>> So, why do you think we should strive to limit the number
>>>> of color definitions?
>>>
>>> Because there's infinitely many colors :-). And programmers are bad at
>>> differentiating them. You can't really tell wavelength of light by
>>> looking at it.
>>>
>>> I mean.. yes, maybe we can add orange, pink, green-blue, violet,
>>> ... white at different temperatures ...
>>>
>>> It will be rather long list.
>>
>> I think that we should allow setting the LED color name after
>> what manufacturer claims it is.
> 
> Well, someone can try to compile list of common colors, and convince
> me that this list is good enough...

It is not necessary, we can add colors as the need arises.

> ...but really, unless there's device where there are leds of
> yellow/orange color... it may be easier to keep the current list.

Yellow has been available since the inception of the led_colors array,
so if we have that, then why we should not have orange?

> IOW "are we solving real problem by introducing orange color"?

Yes, we allow to accurately describe LEDs available
on the market.

And reversing the question - are we solving real problem by
preventing introduction of orange color?

-- 
Best regards,
Jacek Anaszewski

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 20:57             ` Jacek Anaszewski
@ 2020-07-23 21:04               ` Pavel Machek
  2020-07-23 21:17                 ` Marek Behun
  0 siblings, 1 reply; 16+ messages in thread
From: Pavel Machek @ 2020-07-23 21:04 UTC (permalink / raw)
  To: Jacek Anaszewski; +Cc: Marek Behún, linux-leds, Dan Murphy

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]




> > ...but really, unless there's device where there are leds of
> > yellow/orange color... it may be easier to keep the current list.
> 
> Yellow has been available since the inception of the led_colors array,
> so if we have that, then why we should not have orange?

I fear people will confuse yellow and orange.

> > IOW "are we solving real problem by introducing orange color"?
> 
> Yes, we allow to accurately describe LEDs available
> on the market.

That should not be our goal.

If we wanted accurate description, it would be wavelength in nm for
monochrome LEDs. (Incidentally, that's what manufacturers use and we
may want to do that for RGB LEDs).

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 21:04               ` Pavel Machek
@ 2020-07-23 21:17                 ` Marek Behun
  2020-07-23 21:24                   ` Marek Behun
  2020-07-23 21:38                   ` Pavel Machek
  0 siblings, 2 replies; 16+ messages in thread
From: Marek Behun @ 2020-07-23 21:17 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Jacek Anaszewski, linux-leds, Dan Murphy

On Thu, 23 Jul 2020 23:04:52 +0200
Pavel Machek <pavel@ucw.cz> wrote:

> > > ...but really, unless there's device where there are leds of
> > > yellow/orange color... it may be easier to keep the current list.  
> > 
> > Yellow has been available since the inception of the led_colors array,
> > so if we have that, then why we should not have orange?  
> 
> I fear people will confuse yellow and orange.

LOL, so I looked into schematics and the manufacturer of the ethernet
port cage calls the LED yellow. So apparently I confused it with
orange... :D

http://www.link-pp.com/?product/201807116277.html
see LED Option in the table


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 21:17                 ` Marek Behun
@ 2020-07-23 21:24                   ` Marek Behun
  2020-07-23 21:38                   ` Pavel Machek
  1 sibling, 0 replies; 16+ messages in thread
From: Marek Behun @ 2020-07-23 21:24 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Jacek Anaszewski, linux-leds, Dan Murphy

On Thu, 23 Jul 2020 23:17:55 +0200
Marek Behun <marek.behun@nic.cz> wrote:

> LOL, so I looked into schematics and the manufacturer of the ethernet
> port cage calls the LED yellow. So apparently I confused it with
> orange... :D
> 
> http://www.link-pp.com/?product/201807116277.html
> see LED Option in the table

OK so I think we can ignore this "orange" color proposal now, sorry
for taking your time.

I would really appreciate though if we could talk about the road I took
in v2 of the RFC "Add support for LEDs on Marvell PHYs", as compared to
the road in v1. That is a real problem... :D

Marek

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] leds: add orange color
  2020-07-23 21:17                 ` Marek Behun
  2020-07-23 21:24                   ` Marek Behun
@ 2020-07-23 21:38                   ` Pavel Machek
  1 sibling, 0 replies; 16+ messages in thread
From: Pavel Machek @ 2020-07-23 21:38 UTC (permalink / raw)
  To: Marek Behun; +Cc: Jacek Anaszewski, linux-leds, Dan Murphy

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

Hi!

> > > > ...but really, unless there's device where there are leds of
> > > > yellow/orange color... it may be easier to keep the current list.  
> > > 
> > > Yellow has been available since the inception of the led_colors array,
> > > so if we have that, then why we should not have orange?  
> > 
> > I fear people will confuse yellow and orange.
> 
> LOL, so I looked into schematics and the manufacturer of the ethernet
> port cage calls the LED yellow. So apparently I confused it with
> orange... :D

Apparently orange LEDs do exist (and some call them amber) as do
violet, pink, greenish-blue, ...

But... let's not extend the list unless we have good reason.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-07-23 21:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 12:57 [PATCH] leds: add orange color Marek Behún
2020-07-23 13:40 ` Dan Murphy
2020-07-23 13:47   ` Marek Behún
2020-07-23 14:23     ` Dan Murphy
2020-07-23 19:39 ` Pavel Machek
2020-07-23 20:09   ` Jacek Anaszewski
2020-07-23 20:11     ` Jacek Anaszewski
2020-07-23 20:16       ` Pavel Machek
2020-07-23 20:31         ` Jacek Anaszewski
2020-07-23 20:39           ` Pavel Machek
2020-07-23 20:54             ` Dan Murphy
2020-07-23 20:57             ` Jacek Anaszewski
2020-07-23 21:04               ` Pavel Machek
2020-07-23 21:17                 ` Marek Behun
2020-07-23 21:24                   ` Marek Behun
2020-07-23 21:38                   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).