From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Pavel Machek <pavel@ucw.cz>, Gabriele Mazzotta <gabriele.mzt@gmail.com>
Cc: rpurdie@rpsys.net, linux-leds@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: Allow drivers to update the core, and generate events on changes
Date: Tue, 27 Dec 2016 23:57:26 +0100 [thread overview]
Message-ID: <3560132e-ac79-b6fa-200c-da9c7ed9d435@gmail.com> (raw)
In-Reply-To: <20161227200755.GA6345@amd>
Hi Gabriele, Pavel,
On 12/27/2016 09:07 PM, Pavel Machek wrote:
> Hi!
>
>> Similarily to commit 325253a6b2de ("backlight: Allow drivers to update
>> the core, and generate events on changes"), inform userspace about
>> brightness changes and allow drivers to request updates of the
>> brightness value.
>
> First... we had similar patch in tree, and it caused problems, we are
> now trying to figure out how to do it properly.
>
> LED can be updated many times per second, uevent is probably _not_
> good mechanism to achieve that.
>
> Generating uevent for /sys changes does not make much sense, right?
>
>> +extern void led_brightness_force_update(struct led_classdev *led_cdev,
>> + enum led_brightness_update_reason reason);
>
> I see this may make some sense, but there are no uses for this in this
> patch.
>
> My preffered solution would be ... for hardware that changes led
> brightness itself, introduce a "trigger", so that userspace knows this
> led is special, and then provide poll()able /sys fs file interested
> parties can read.
I've recently submitted for a discussion the idea of "persistent
triggers" [0]. Any feedback is very much appreciated.
[0] https://www.spinics.net/lists/linux-leds/msg07332.html
--
Best regards,
Jacek Anaszewski
prev parent reply other threads:[~2016-12-27 22:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 19:11 [PATCH] leds: Allow drivers to update the core, and generate events on changes Gabriele Mazzotta
2016-12-27 20:07 ` Pavel Machek
2016-12-27 20:23 ` Gabriele Mazzotta
2016-12-27 21:02 ` Pavel Machek
2016-12-27 22:57 ` Jacek Anaszewski [this message]
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=3560132e-ac79-b6fa-200c-da9c7ed9d435@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=gabriele.mzt@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--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).