lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150311190255.GA20247@amd>
Date:	Wed, 11 Mar 2015 20:02:55 +0100
From:	Pavel Machek <pavel@....cz>
To:	Raphaƫl Teysseyre <rteysseyre@...il.com>
Cc:	Joe Xue <lgxue@...mail.com>, Bryan Wu <cooloney@...il.com>,
	"rpurdie@...ys.net" <rpurdie@...ys.net>,
	Linux LED Subsystem <linux-leds@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC] leds: Add status code trigger

Hi!

> > > This patch is very similar to mine patten trigger and all features are covered by my patch.
> > > If you are considering to take this feature, could you consider my patch instead?
> > > http://thread.gmane.org/gmane.linux.documentation/19116/focus=19135
> > 
> > That one is indeed better than this patch (as it supports almost
> > arbitrary blinking pattern on single LED, it will not help much with
> > smooth brightness control.
> 
> I agree, that patch supports more features than mine, I didn't find it
> while browsing the mailing list archive.

> > Would solution below work for you?

> > > > I think I have interface to handle most of the issues: array of
> > > > integers in "brightness, length in miliseconds".
> > > > 
> > > > So for example slowly blinking LED would be "0 1000msec, 255 1000
> > > > msec". On off pattern would be "0 1000msec, 255 0msec, 255 1000msec, 0
> > > > 0msec".
> > > > 
> > > > Rapahael, this should be able to do all the stuff you want to do. It
> > > > can also do morse code, slow blinks, and combination of both. Do you
> > > > want to try implementing it?
> > >  		 	   		  
> > 
> 
> I could implement it. This is how I'd do it :
> When activated, the trigger would export three
> sysfs attributes : pattern, pattern_repeat, and pattern_once.
> 
> 	pattern : list of brightness/time couple, separated by newlines
> 		For the slowly blinking LED of your example,
> 		this attribute would contain :
> 		0 1000
> 		255 1000
> 
> 		For a heartbeat-like pattern :
> 		0 1000
> 		255 100
> 		0 100
> 		255 100

That would be "slowly go to zero intensity, quickly go to max
intensity, to zero, to maximum". If you wanted to turn the LED on/off
without going through partial brightnesses, you'd do

	        0 1000
		255 0
		255 100
		0 0
		0 100
		255 0
		255 100
		0 0

> 	pattern_repeat : repeat this pattern indefinitely ?
> 		1 -> yes, 0 -> no
> 
> 	pattern_once : if pattern_repeat = 0, writing 1 to this
> 		file makes the pattern run once .

I'd do attribute "repeat" with number of repetitions, or -1 == "repeat
forever" default value.

Best regards,
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ