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: <20131231190304.GA15451@amd.pavel.ucw.cz>
Date:	Tue, 31 Dec 2013 20:03:04 +0100
From:	Pavel Machek <pavel@....cz>
To:	Richard Weinberger <richard.weinberger@...il.com>
Cc:	Joe Xue <lgxue@...mail.com>,
	"cooloney@...il.com" <cooloney@...il.com>,
	"rpurdie@...ys.net" <rpurdie@...ys.net>,
	"rob@...dley.net" <rob@...dley.net>,
	"milo.kim@...com" <milo.kim@...com>,
	"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH] Add LED pattern trigger

On Tue 2013-12-31 13:29:21, Richard Weinberger wrote:
> On Tue, Dec 31, 2013 at 12:33 PM, Pavel Machek <pavel@....cz> wrote:
> > On Tue 2013-12-31 00:00:39, Joe Xue wrote:
> >> > What about something like this?
> >> >
> >> > Not shcheduling timer when nothing changed should save a bit of power/cpu...
> >> >
> >> > if (pattern_data->pattern[pattern_data->count] == '/') {
> >> > return;
> >> > }
> >> >
> >> > this = pattern_data->pattern[pattern_data->count]
> >> > if (this == '#')
> >> > new_brigtness = pattern_data->brightness_on;
> >> > if (this == ' ')
> >> > new_brigtness = LED_OFF;
> >> > repeat = 1;
> >> > while (pattern_data->pattern[pattern_data->count + repeat] == this)
> >> > repeat++;
> >> >
> >> > mod_timer(&pattern_data->timer,
> >> > jiffies + msecs_to_jiffies(pattern_data->delay_unit * repeat));
> >> >
> >> >
> >> Working on it.
> >>
> >> Thanks for your help.
> >
> > You are welcome :-).
> 
> Why do we need this within the kernel?
> Patterns can easily created using a simple user space program.

Some machines (N900) can do blinking in hardware, and we want
consistent kernel-user interface. See the mailing list.
									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