Re: how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)

2014-01-05 Thread Pavel Machek
Hi! > >> > Reason to do it in kernel is that some machines actually have > >> > "coprocessor" on i2c that can do it while main CPU is suspended. (For > >> > more reasons, see beggining of thread). > >> > >> Ick ick. > >> > >> > Binary attribute with array of bytes should be acceptable, rights? > >

Re: how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)

2014-01-02 Thread Bryan Wu
On Sun, Dec 29, 2013 at 3:21 AM, Pavel Machek wrote: > Hi! > >> > Idea would be "sequence of brigtnesses" (one file) and "delay between >> > changes" (second file). >> >> Ick. >> >> > Reason to do it in kernel is that some machines actually have >> > "coprocessor" on i2c that can do it while main

RE: [PATCH] Add the LED burst trigger

2013-12-29 Thread Joe Xue
Hi All, I have finished the pattern trigger and submitted it. For your convince to discuss, I also put it here. Joe The LED pattern trigger allows LEDs blink in user defined pattern.     new file:   Documentation/leds/ledtrig-pattern.txt     modified:   drivers/leds/trigger/Kconfig     modifie

Re: how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)

2013-12-29 Thread Pavel Machek
Hi! > > Idea would be "sequence of brigtnesses" (one file) and "delay between > > changes" (second file). > > Ick. > > > Reason to do it in kernel is that some machines actually have > > "coprocessor" on i2c that can do it while main CPU is suspended. (For > > more reasons, see beggining of thre

Re: [PATCH] Add the LED burst trigger

2013-12-29 Thread Pavel Machek
Hi! > > I have finished the patten trigger and have tested it. > Do you mind me putting your name as suggest-by? For part idea is >from you. Feel free to do that, thanks :-). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesk

Re: how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)

2013-12-28 Thread Greg KH
On Sun, Dec 29, 2013 at 12:50:46AM +0100, Pavel Machek wrote: > On Sat 2013-12-28 13:50:42, Greg KH wrote: > > On Sat, Dec 28, 2013 at 10:25:23PM +0100, Pavel Machek wrote: > > > Hi! > > > > > > > >> Sysfs is meant to be human-readable/writable, so please use plain > > > > >> ASCII > > > > >> num

RE: [PATCH] Add the LED burst trigger

2013-12-28 Thread Joe Xue
..@gmail.com; rpur...@rpsys.net; r...@landley.net; milo@ti.com; > linux-l...@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-...@vger.kernel.org > Subject: Re: [PATCH] Add the LED burst trigger > > Hi! > >>> And while " " for pause and "#"

Re: how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)

2013-12-28 Thread Pavel Machek
On Sat 2013-12-28 13:50:42, Greg KH wrote: > On Sat, Dec 28, 2013 at 10:25:23PM +0100, Pavel Machek wrote: > > Hi! > > > > > >> Sysfs is meant to be human-readable/writable, so please use plain ASCII > > > >> numbers in strings instead. > > > > > > > > Actually, sysfs is meant to be one value per

Re: how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)

2013-12-28 Thread Greg KH
On Sat, Dec 28, 2013 at 10:25:23PM +0100, Pavel Machek wrote: > Hi! > > > >> Sysfs is meant to be human-readable/writable, so please use plain ASCII > > >> numbers in strings instead. > > > > > > Actually, sysfs is meant to be one value per file, and it is > > > > Ideally, yes. > > > > > underst

Re: how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)

2013-12-28 Thread Pavel Machek
Hi! > >> Sysfs is meant to be human-readable/writable, so please use plain ASCII > >> numbers in strings instead. > > > > Actually, sysfs is meant to be one value per file, and it is > > Ideally, yes. > > > understood that data that are "natively blob" are just passed as > > blob. (I believe thi

Re: how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)

2013-12-28 Thread Geert Uytterhoeven
On Sat, Dec 28, 2013 at 8:29 PM, Pavel Machek wrote: >> Sysfs is meant to be human-readable/writable, so please use plain ASCII >> numbers in strings instead. > > Actually, sysfs is meant to be one value per file, and it is Ideally, yes. > understood that data that are "natively blob" are just p

how to represent sequence of brightnesses in /sys (was Re: [PATCH] Add the LED burst trigger)

2013-12-28 Thread Pavel Machek
On Sat 2013-12-28 19:51:59, Geert Uytterhoeven wrote: > On Sat, Dec 28, 2013 at 11:16 AM, Pavel Machek wrote: > >> Good idea. > >> I have finished but I'll change it to this way soon and test it in next > >> some days. > >> > >> What the idea about the character to indicate stop? > >> > >> I mean

Re: [PATCH] Add the LED burst trigger

2013-12-28 Thread Pavel Machek
Hi! > > And while " " for pause and "#" for light would work. Maybe we chould > > do "\0" for pause and "\177" for light... and interpret everything > > between as an intensity. That will make it useful for LEDs with > > variable intensites, too... > > "\0" is not easy to give if application is a

Re: [PATCH] Add the LED burst trigger

2013-12-28 Thread Geert Uytterhoeven
On Sat, Dec 28, 2013 at 11:16 AM, Pavel Machek wrote: >> Good idea. >> I have finished but I'll change it to this way soon and test it in next some >> days. >> >> What the idea about the character to indicate stop? >> >> I mean this patten maybe indicate just once maybe indicate repeatedly until

RE: [PATCH] Add the LED burst trigger

2013-12-28 Thread Joe Xue
Hi >> Good idea. >> I have finished but I'll change it to this way soon and test it in next some >> days. >> >> What the idea about the character to indicate stop? >> >> I mean this patten maybe indicate just once maybe indicate repeatedly until >> the next patten. >> >> What about "/"? >> If th

Re: [PATCH] Add the LED burst trigger

2013-12-28 Thread Pavel Machek
Hi! > Good idea. > I have finished but I'll change it to this way soon and test it in next some > days. > > What the idea about the character to indicate stop? > > I mean this patten maybe indicate just once maybe indicate repeatedly until > the next patten. > > What about "/"? > If there is

RE: [PATCH] Add the LED burst trigger

2013-12-27 Thread Joe Xue
linux-l...@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-...@vger.kernel.org > Subject: Re: [PATCH] Add the LED burst trigger > > Hi! > >> I'm writing the Morse code trigger. >> what about this >> >> echo "-.-. *"> patten >&

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread Richard Purdie
On Fri, 2013-12-27 at 18:13 +, One Thousand Gnomes wrote: > > Well, this one will be really smaller. And yes, it will make some > > memory non-swappable, but I believe with triggers and infrastructure > > for N900 (and similar) it will be worth it. > > Ah yes thats such a major proportion of p

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread Pavel Machek
Hi! > > Well, this one will be really smaller. And yes, it will make some > > memory non-swappable, but I believe with triggers and infrastructure > > for N900 (and similar) it will be worth it. > > Ah yes thats such a major proportion of platforms I don't know other cellphone hardware in detail

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread Geert Uytterhoeven
On Fri, Dec 27, 2013 at 7:13 PM, One Thousand Gnomes wrote: >> Plus, it will actually save CPU cycles, and thus significant power. > > All of which will be totally wiped out if you bump all the millions of > x86 server boxes in the world up by one page of kernel space and cause a > few disk I/Os

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread One Thousand Gnomes
> Well, this one will be really smaller. And yes, it will make some > memory non-swappable, but I believe with triggers and infrastructure > for N900 (and similar) it will be worth it. Ah yes thats such a major proportion of platforms > Plus, it will actually save CPU cycles, and thus significant

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread Pavel Machek
On Fri 2013-12-27 14:18:26, One Thousand Gnomes wrote: > > At least nokia N900 actually has "hardware acceleration" for LED > > blinking. (Tiny CPU connected over i2c, able to control 3 LEDs, turing > > complete with something like 20 _bits_ of storage and 30 program > > steps). Apparently, it make

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread One Thousand Gnomes
> At least nokia N900 actually has "hardware acceleration" for LED > blinking. (Tiny CPU connected over i2c, able to control 3 LEDs, turing > complete with something like 20 _bits_ of storage and 30 program > steps). Apparently, it makes more stable patterns (timing is very hard > to guarantee from

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread Pavel Machek
On Fri 2013-12-27 06:39:55, Rob Landley wrote: > On 12/26/13 10:58, Joe Xue wrote: > >Hi all, > > > >I think Pavel's suggestion is a good idea, I'm starting to write another > >trigger named Morse code trigger. > > Those who don't know history are doomed to fail the class and have > to retake it

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread Pavel Machek
Hi! > > Yes, Morse code can indicate any means. But when we look at the LEDs, would > > we like to also have a Morse code book in hand? > > > > The burst led blink idea is because it is easy to use and easy to describe. > > Mostly when users on site are describing the LEDs states to the support

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread Rob Landley
On 12/26/13 10:58, Joe Xue wrote: Hi all, I think Pavel's suggestion is a good idea, I'm starting to write another trigger named Morse code trigger. Those who don't know history are doomed to fail the class and have to retake it with the same instructor next year: https://lkml.org/lkml/200

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread Geert Uytterhoeven
On Fri, Dec 27, 2013 at 1:31 AM, Joe Xue wrote: > echo "-.-. *"> patten > - a long on then a off > . a short on then a off > space a long off > * mean repeat the patten > s mean indicate the patten just one time then stop Why both "*" and "s"?

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread One Thousand Gnomes
On Wed, 25 Dec 2013 20:02:33 -0500 Joe Xue wrote: > Hi, > > Yes, Morse code can indicate any means. But when we look at the LEDs, would > we like to also have a Morse code book in hand? > > The burst led blink idea is because it is easy to use and easy to describe. > Mostly when users on site

Re: [PATCH] Add the LED burst trigger

2013-12-27 Thread Pavel Machek
Hi! > I'm writing the Morse code trigger. > what about this > > echo "-.-. *"> patten > -  a long on then a off > .  a short on then a off > space a long off > * mean repeat the patten > s mean indicate the patten just one time then stop Actual

RE: [PATCH] Add the LED burst trigger

2013-12-26 Thread Joe Xue
-- > Date: Thu, 26 Dec 2013 15:26:08 +0100 > From: pa...@ucw.cz > To: lg...@hotmail.com > CC: coolo...@gmail.com; rpur...@rpsys.net; r...@landley.net; milo@ti.com; > linux-l...@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-...@vger.kernel.org > Subject: Re: [PA

RE: [PATCH] Add the LED burst trigger

2013-12-26 Thread Joe Xue
--- > From: lg...@hotmail.com > To: pa...@ucw.cz > CC: coolo...@gmail.com; rpur...@rpsys.net; r...@landley.net; milo@ti.com; > linux-l...@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-...@vger.kernel.org > Subject: RE: [PATCH] Add the LED burst trigger > Date:

RE: [PATCH] Add the LED burst trigger

2013-12-26 Thread Joe Xue
...@ti.com; > linux-l...@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-...@vger.kernel.org > Subject: Re: [PATCH] Add the LED burst trigger > > Hi! > >> Yes, Morse code can indicate any means. But when we look at the LEDs, would >> we like to also have a Morse code book i

Re: [PATCH] Add the LED burst trigger

2013-12-26 Thread Pavel Machek
Hi! > Yes, Morse code can indicate any means. But when we look at the LEDs, would > we like to also have a Morse code book in hand? > > The burst led blink idea is because it is easy to use and easy to describe. > Mostly when users on site are describing the LEDs states to the support > engine

Re: [PATCH] Add the LED burst trigger

2013-12-26 Thread Geert Uytterhoeven
On Tue, Dec 24, 2013 at 3:30 PM, wrote: > +Three properties are exported. They are freq, times and delay_off. > + > + freq - the blink frequency, default value is 3 means 3HZ Please write "3 Hz". In the kernel "HZ" means the number of jiffies per second, and "3 HZ" thus represents a 3-s

RE: [PATCH] Add the LED burst trigger

2013-12-25 Thread Joe Xue
..@vger.kernel.org > Subject: Re: [PATCH] Add the LED burst trigger > > Hi! > >> +Sometimes, the system has only one no-color led to indicate different stats. >> +The LED timer trigger can let LEDs to blink in different frequency, but most >> +people maybe just can discrimi

Re: [PATCH] Add the LED burst trigger

2013-12-25 Thread Pavel Machek
Hi! > +Sometimes, the system has only one no-color led to indicate different stats. > +The LED timer trigger can let LEDs to blink in different frequency, but most > +people maybe just can discriminate two states, slow and fast. > + > +In this case, Morse code maybe is a good choice :-), but who c