[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170222123929.GD21558@pali>
Date: Wed, 22 Feb 2017 13:39:29 +0100
From: Pali Rohár <pali.rohar@...il.com>
To: Pavel Machek <pavel@....cz>
Cc: Richard Purdie <rpurdie@...ys.net>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
Darren Hart <dvhart@...radead.org>,
platform-driver-x86@...r.kernel.org
Subject: Re: LED devices & poll() for brightness attribute
On Wednesday 22 February 2017 13:25:57 Pavel Machek wrote:
> Hi!
>
> > But this support is useful just for one single central userspace
> > application which will control all leds in system other application
> > which will change state by /sys/class/leds/ will de-synchronize that one
> > central application.
>
> Yes. Does it matter for some real use case?
Yes. E.g. systemd has already some support for changing leds. And I do
not want to be forced to use systemd (or any other specific application)
just because it already controls leds.
And my own application for controlling leds should know current state of
them if it is possible.
> > So I think new ABI is not sufficient and I would propose to add poll()
> > support also for changes done by userspace, write() to attribute
> > /sys/class/leds/.../brightness.
>
> Not easily possible, as we have triggers, and this was discussed in
> great great lengths before. Please go through that discussion.
Without triggers and blinking it should be possible.
Just notify only when some application do echo > brightness.
--
Pali Rohár
pali.rohar@...il.com
Powered by blists - more mailing lists