LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Richard Hughes <hughsient@gmail.com>
Cc: John Belmonte <john@neggie.net>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-acpi <linux-acpi@vger.kernel.org>
Subject: Re: Add INPUT support to toshiba_acpi
Date: Thu, 31 May 2007 13:53:13 +0100 [thread overview]
Message-ID: <1180615994.3030.166.camel@cookie.hadess.net> (raw)
In-Reply-To: <1180614979.2693.26.camel@localhost.localdomain>
On Thu, 2007-05-31 at 13:36 +0100, Richard Hughes wrote:
> Attached patch adds a kernel thread to do polling on Toshiba hardware.
>
> Toshiba hardware is a little oddball, and does not provide ACPI events
> on some key presses, typically Fn hotkey buttons. The key interface is
> now polled, and events now matched to a list of toshiba specific
> scancodes, and are squirted to userspace using the INPUT subsystem.
>
> This means that toshiba laptops buttons "just work" without any
> userspace daemon (using uinput) such as fnfx or bodges such as using a
> userspace hal addon. Doing the polling in kernel is more efficient, and
> makes stuff just work out of the box. You can assign the keys using
> standard X keymaps, or using tools such as gnome-keybinding-properties.
>
> This is similar to other patches sent for the thinkpad_acpi driver, and
> is part of the "Unf*ck my keyboard" initiative to make multimedia keys
> just work.
>
> Changes from the first patch involve switching to a workqueue for the
> polling, not breaking the spaces in "hotkeys_via_input" and also masking
> out the fn key button up.
A couple of things:
- use a switch statement in toshiba_deliver_button_event(), would look a
bit cleaner.
- make the magic number #defines
- not sure if it's possible, but you should disable the workqueue
altogether if nothing has the input device opened.
Hopefully we'll find a way to receive an interrupt, or some kind of
event when the keys are pressed in the future, and completely avoid the
polling. In the meantime, it should be minimised.
Cheers
--
Bastien Nocera <hadess@hadess.net>
next prev parent reply other threads:[~2007-05-31 14:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-31 12:36 Richard Hughes
2007-05-31 12:53 ` Bastien Nocera [this message]
2007-05-31 13:43 ` Richard Hughes
2007-05-31 15:46 ` Richard Hughes
2007-05-31 16:46 ` Andreas Mohr
2007-05-31 23:09 ` Richard Hughes
2007-06-01 16:45 ` Dmitry Torokhov
2007-06-02 12:50 ` Richard Hughes
2007-06-02 14:23 ` Matthew Garrett
2007-06-03 4:48 ` Dmitry Torokhov
2007-06-07 16:58 ` Richard Hughes
2007-06-08 14:23 ` Dmitry Torokhov
2007-06-08 14:30 ` Richard Hughes
2007-06-11 13:26 ` Renato S. Yamane
2007-06-23 14:56 ` Rolf Eike Beer
2007-06-25 9:52 ` Richard Hughes
2007-06-25 11:03 ` Rolf Eike Beer
2007-06-26 5:03 ` Rolf Eike Beer
2007-06-26 8:56 ` Richard Hughes
2007-06-28 11:27 ` Rolf Eike Beer
2007-06-28 12:22 ` Renato S. Yamane
2007-07-03 5:38 ` Rolf Eike Beer
2007-07-03 12:59 ` Renato S. Yamane
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=1180615994.3030.166.camel@cookie.hadess.net \
--to=hadess@hadess.net \
--cc=hughsient@gmail.com \
--cc=john@neggie.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: Add INPUT support to toshiba_acpi' \
/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
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).