linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Richard Purdie <rpurdie@rpsys.net>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	Darren Hart <dvhart@infradead.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: LED devices & poll() for brightness attribute
Date: Wed, 22 Feb 2017 13:39:29 +0100	[thread overview]
Message-ID: <20170222123929.GD21558@pali> (raw)
In-Reply-To: <20170222122557.GA3807@amd>

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@gmail.com

  reply	other threads:[~2017-02-22 12:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22  9:06 LED devices & poll() for brightness attribute Pali Rohár
2017-02-22 12:25 ` Pavel Machek
2017-02-22 12:39   ` Pali Rohár [this message]
2017-02-22 20:54     ` Pavel Machek
2017-02-22 21:16       ` Pali Rohár
2017-02-23 14:37         ` Pavel Machek
2017-02-23 14:48           ` Pali Rohár
2017-02-23 20:23             ` Pavel Machek
2017-02-23 20:44               ` Pali Rohár
2017-02-23 21:03                 ` Pavel Machek
2017-02-24  8:50                   ` Pali Rohár
2017-02-24  8:52                     ` Hans de Goede
2017-02-24  8:58                       ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170222123929.GD21558@pali \
    --to=pali.rohar@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).