Re: [PATCH v5 05/26] leds: core: Add support for composing LED class device names

2019-07-17 Thread Jacek Anaszewski
Hi Pavel, On 7/4/19 12:00 AM, Pavel Machek wrote: > Hi! > > Sorry for the delay. No problem. >> @@ -27,6 +29,18 @@ EXPORT_SYMBOL_GPL(leds_list_lock); >> LIST_HEAD(leds_list); >> EXPORT_SYMBOL_GPL(leds_list); >> >> +const char *led_colors[LED_COLOR_ID_MAX] = { > > const char * const , if we

Various LED complexities was Re: [PATCH v5 05/26] leds: core: Add support for composing LED class device names

2019-07-03 Thread Pavel Machek
On Fri 2019-06-28 13:30:30, David Laight wrote: > From: Linus Walleij > > Sent: 28 June 2019 09:46 > ... > > A problem with LEDs is that it invites bikeshedding because it is too > > relateable. > > Bikeshedding leds :-) > > It also isn't at all clear how to handle bi-colour and tri-colour leds.

Re: [PATCH v5 05/26] leds: core: Add support for composing LED class device names

2019-07-03 Thread Pavel Machek
Hi! Sorry for the delay. > @@ -27,6 +29,18 @@ EXPORT_SYMBOL_GPL(leds_list_lock); > LIST_HEAD(leds_list); > EXPORT_SYMBOL_GPL(leds_list); > > +const char *led_colors[LED_COLOR_ID_MAX] = { const char * const , if we want to play that game? > + [LED_COLOR_ID_WHITE] = "white", > + [LED

RE: [PATCH v5 05/26] leds: core: Add support for composing LED class device names

2019-06-28 Thread David Laight
From: Linus Walleij > Sent: 28 June 2019 09:46 ... > A problem with LEDs is that it invites bikeshedding because it is too > relateable. Bikeshedding leds :-) It also isn't at all clear how to handle bi-colour and tri-colour leds. ISTR the usual interface lets you set the brightness, but more oft

Re: [PATCH v5 05/26] leds: core: Add support for composing LED class device names

2019-06-28 Thread Linus Walleij
On Sun, Jun 9, 2019 at 8:08 PM Jacek Anaszewski wrote: > Add generic support for composing LED class device name. The newly > introduced led_compose_name() function composes device name according > to either or pattern, > depending on the configuration of initialization data. > > Backward compa

Re: [PATCH v5 05/26] leds: core: Add support for composing LED class device names

2019-06-27 Thread Jacek Anaszewski
Hi Oleh, On 6/26/19 10:07 PM, Oleh Kravchenko wrote: > Hello Jacek, > so after this patch will be merged. > > There will be a way to define custom function name by DeviceTree? Yes. We standardize LED functions just to avoid spreading many similarly looking function names with the same semantics.

Re: [PATCH v5 05/26] leds: core: Add support for composing LED class device names

2019-06-26 Thread Oleh Kravchenko
Hello Jacek, so after this patch will be merged. There will be a way to define custom function name by DeviceTree? 26.06.19 22:05, Jacek Anaszewski пише: > Gentle reminder. > > Pavel, Dan - any conclusions? > > This patch is the main part of the proposed changes, > so it would be good to spot a

Re: [PATCH v5 05/26] leds: core: Add support for composing LED class device names

2019-06-26 Thread Jacek Anaszewski
Gentle reminder. Pavel, Dan - any conclusions? This patch is the main part of the proposed changes, so it would be good to spot any remaining issues. What needs a consensus is also a new Documentation/leds/led-functions.txt file I introduce in the patch 26/26. Best regards, Jacek Anaszewski On

[PATCH v5 05/26] leds: core: Add support for composing LED class device names

2019-06-09 Thread Jacek Anaszewski
Add generic support for composing LED class device name. The newly introduced led_compose_name() function composes device name according to either or pattern, depending on the configuration of initialization data. Backward compatibility with in-driver hard-coded LED class device names is assured