Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-06 Thread Geert Uytterhoeven
Hi Willy, On Wed, Jul 4, 2018 at 4:41 AM Willy Tarreau wrote: > On Tue, Jul 03, 2018 at 09:43:06PM +0300, Andy Shevchenko wrote: > Well, in this case it's even possible to go further and avoid storing > 36 strings. Indeed, no representation is longer than 5 symbols, so you > can use 5 bits for th

RE: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-05 Thread David Laight
... > > Well, just like we have LED and LED triggers in the kernel, I think having > > a generic way to use patterns could be nice and in this case Morse could be > > one such pattern, but if that means it's limited to userland to configure > > it then it sadly voids all of its benefits. I've been

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-04 Thread Pavel Machek
Hi! > >LED pattern trigger should be merged, instead. > > We've already agreed in [0] upon pattern sysfs file, and related > patch set [1] is just to be merged. > > [0] https://lkml.org/lkml/2018/5/12/142 > [1] https://patchwork.kernel.org/patch/10495595/ Well, [1] is for LEDs that can do patte

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-04 Thread Jacek Anaszewski
Hi All, On 07/04/2018 08:19 PM, Pavel Machek wrote: Hi! On Wed, Jul 04, 2018 at 08:53:05AM +0200, Pavel Machek wrote: As I stated before, I don't think morse encoder belongs in kernel. On the opposite, I think that the kernel needs to be a bit more autonomous when it comes to reporting its

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-04 Thread Jacek Anaszewski
Hi Pavel, On 07/04/2018 08:53 AM, Pavel Machek wrote: On Tue 2018-07-03 17:53:28, Andreas Klinger wrote: Send out a morse code by using LEDs. This is useful especially on embedded systems without displays to tell the user about error conditions and status information. The trigger will be call

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-04 Thread Pavel Machek
Hi! > On Wed, Jul 04, 2018 at 08:53:05AM +0200, Pavel Machek wrote: > > As I stated before, I don't think morse encoder belongs in kernel. > > On the opposite, I think that the kernel needs to be a bit more autonomous > when it comes to reporting its own issues. Being able to report a panic > whe

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-04 Thread Andy Shevchenko
On Wed, Jul 4, 2018 at 5:41 AM, Willy Tarreau wrote: > On Tue, Jul 03, 2018 at 09:43:06PM +0300, Andy Shevchenko wrote: > Well, in this case it's even possible to go further and avoid storing > 36 strings. Indeed, no representation is longer than 5 symbols, so you > can use 5 bits for the encodin

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-04 Thread Greg KH
On Wed, Jul 04, 2018 at 09:34:43AM +0200, Willy Tarreau wrote: > Hi Pavel, > > On Wed, Jul 04, 2018 at 08:53:05AM +0200, Pavel Machek wrote: > > As I stated before, I don't think morse encoder belongs in kernel. > > On the opposite, I think that the kernel needs to be a bit more autonomous > when

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-04 Thread Geert Uytterhoeven
Hi Willy, On Wed, Jul 4, 2018 at 4:41 AM Willy Tarreau wrote: > On Tue, Jul 03, 2018 at 09:43:06PM +0300, Andy Shevchenko wrote: > > > + {'a', ".-"}, > > > + {'b', "-..."}, > > > > Do you expect this to be changed somehow? > > Otherwise we might just to keep two char arrays of alphas

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-04 Thread Willy Tarreau
Hi Pavel, On Wed, Jul 04, 2018 at 08:53:05AM +0200, Pavel Machek wrote: > As I stated before, I don't think morse encoder belongs in kernel. On the opposite, I think that the kernel needs to be a bit more autonomous when it comes to reporting its own issues. Being able to report a panic when user

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-03 Thread Pavel Machek
On Tue 2018-07-03 17:53:28, Andreas Klinger wrote: > Send out a morse code by using LEDs. > > This is useful especially on embedded systems without displays to tell the > user about error conditions and status information. > > The trigger will be called "morse" > > The string to be send is writt

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-03 Thread Willy Tarreau
On Tue, Jul 03, 2018 at 09:43:06PM +0300, Andy Shevchenko wrote: > > +struct morse_char { > > + charc; > > + char*z; > > +}; > > + > > > +static struct morse_char morse_table[] = { > > const ? > > > + {'a', ".-"}, > > + {'b', "-..."}, > > + {'c', "-.-."}, >

Re: [PATCH v2] leds: ledtrig-morse: send out morse code

2018-07-03 Thread Andy Shevchenko
On Tue, Jul 3, 2018 at 6:53 PM, Andreas Klinger wrote: > Send out a morse code by using LEDs. > > This is useful especially on embedded systems without displays to tell the > user about error conditions and status information. > > The trigger will be called "morse" > > The string to be send is wri