Subject: Re: [RFC PATCH 1/2] Hardware button support for Wireless cards: radiobtn

From: Stefan Rompf <[email-masked]>
Date: Sun, 4 Jun 2006 12:14:45 +0200

Am Sonntag 04 Juni 2006 10:02 schrieb Ivo van Doorn:

> Except for the bluetooth radio key (which should be supported by the
> radiobtn interface as well) the other buttons have support through already
> excisting input devices if I am correct.

You are wrong for quite a bunch of laptop models. That's why I pointed you to 
the wistron_btns driver. Alternatively, look at the acerhk driver 
(http://www2.informatik.hu-berlin.de/~tauber/acerhk/). Many systems have a 
number of additional buttons that need to be handled by a special driver, all 
sent to userspace, and just one of them to trigger the wireless card. Other 
models just handle the button in ACPI and generate an additional ACPI event.

Looking at the RT2400-driver, I see what you want to accomplish: Take the view 
of the WLAN card on the hardware controlled button enable/disable and 
generate events on it. However, in many cases it is another driver (see 
above) that sets or clears this state, and this should be the instance to 
send the input event.

Note that I do not have objections against the driver being included in the 
kernel - it just does not qualify as generic radiobutton support, but I know 
it's hard to find a good name ;-)

Looking at the code only: There should be an additional non-polling interface 
for drivers that can generate events on the own.

Stefan