From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
rpurdie@rpsys.net, lenb@kernel.org, rui.zhang@intel.com,
corentincj@iksaif.net
Subject: Re: [PATCH 1/3] backlight: Allow drivers to update the core, and generate events on changes
Date: Tue, 14 Jul 2009 12:54:09 -0300 [thread overview]
Message-ID: <20090714155409.GA31991@khazad-dum.debian.net> (raw)
In-Reply-To: <20090714132152.GA22521@srcf.ucam.org>
On Tue, 14 Jul 2009, Matthew Garrett wrote:
> On Tue, Jul 14, 2009 at 07:30:07AM -0300, Henrique de Moraes Holschuh wrote:
> > On Mon, 13 Jul 2009, Matthew Garrett wrote:
> > > Certain hardware will send us events when the backlight brightness
> > > changes. Add a function to update the value in the core, and
> > > additionally send a uevent so that userspace can pop up appropriate
> > > UI. The uevents are flagged depending on whether the update originated
> > > in the kernel or from userspace, making it easier to only display UI
> > > at the appropriate time.
> >
> > Any reasons to not do it using poll() support (since sysfs has it)? Or at
> > least, do both poll and uevents?
>
> More code? It doesn't really seem necessary.
Well, we all know just how marvelously engineered and high-bandwidth the
uevent+udev+everything else channel is, don't we?
Adding the poll() notification is not expensive, one line to do it, plus a
few more to find out the exact sysfs node that needs to receive the
notification (hideous API, that).
> > Other than that, I like the idea a lot. thinkpad-acpi will use this event
> > support.
>
> Good, that's one of the use-cases I wanted to deal with - but the hotkey
> mask stuff is complicated enough that I hadn't got round to touching
> that yet. The combination of this and the ALSA mixer code should get us
> full notification.
Leave it to me. Even if it arrives a bit later than the main patch, it
won't cause problems for the merging of the main work anyway, and as you
said, it *IS* hairy code to do it right and it plugs right in the middle of
the more confusing parts of thinkpad-acpi. I will do it in a way that makes
the whole thing also usable for the mixer notifications.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
next prev parent reply other threads:[~2009-07-14 15:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 20:41 [PATCH 1/3] backlight: Allow drivers to update the core, and generate events on changes Matthew Garrett
2009-07-13 20:41 ` [PATCH 2/3] ACPI: Update the backlight state when we change brightness Matthew Garrett
2009-07-13 20:41 ` [PATCH 3/3] eeepc-laptop: " Matthew Garrett
2009-07-14 0:58 ` [PATCH 1/3] backlight: Allow drivers to update the core, and generate events on changes ykzhao
2009-07-14 1:53 ` Matthew Garrett
2009-07-14 15:48 ` Matthew Garrett
2009-07-14 10:30 ` Henrique de Moraes Holschuh
2009-07-14 13:21 ` Matthew Garrett
2009-07-14 15:54 ` Henrique de Moraes Holschuh [this message]
2009-07-14 12:29 ` Richard Purdie
2009-07-14 12:55 ` Matthew Garrett
2009-07-15 7:55 ` Zhang Rui
2009-07-15 8:22 ` Richard Purdie
2009-07-15 8:38 ` Zhang Rui
2009-07-15 9:11 ` Richard Purdie
2009-07-15 13:58 ` Matthew Garrett
2009-07-16 2:39 ` Zhang Rui
2009-07-16 2:40 ` Matthew Garrett
2009-07-29 15:05 ` Pavel Machek
2009-07-29 15:20 ` Matthew Garrett
2009-07-29 15:31 ` Richard Purdie
-- strict thread matches above, loose matches on Subject: below --
2009-07-14 16:06 Matthew Garrett
2009-07-16 21:33 ` Michal Schmidt
2009-07-18 11:48 ` Pavel Machek
2009-09-19 23:24 ` Henrique de Moraes Holschuh
2009-09-20 4:15 ` Matthew Garrett
2009-09-20 11:16 ` Henrique de Moraes Holschuh
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=20090714155409.GA31991@khazad-dum.debian.net \
--to=hmh@hmh.eng.br \
--cc=corentincj@iksaif.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=rpurdie@rpsys.net \
--cc=rui.zhang@intel.com \
/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