INPUT: add a new EV_SW SW_RADIO event, for radio switches on laptops
commitfbcb932fdbe1c8d9469e70c9a7a336d8d85778da
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 1 Jul 2007 13:56:14 +0000 (1 10:56 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 7 Jul 2007 12:45:09 +0000 (7 09:45 -0300)
tree18f08ff57ccc03f4558c9564745ad24a67ab7116
parent1c505af55f73f8cf061f3c1e7b7b19f1b23142f5
INPUT: add a new EV_SW SW_RADIO event, for radio switches on laptops

Many laptops have rf-kill physical switches that are not keys, but slider
or rocker switches.  Often (like in all ThinkPads with a radio kill slider
switch), they have both a slider/rocker switch and a hot key.

Trying to kludge a real switch to act like a key is not a very smart thing
to do if you can help it, and it gets specially bad when you are going to
have both in the same machine.  So, we do the right thing and add an input
EV_SW event for radio kill switches.

The EV_SW SW_RADIO event is defined with positive logic, i.e. when the
switch is active, the radios are to be enabled.  When the switch is
inactive, the radios are to be disabled.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ivo van Doorn <ivdoorn@gmail.com>
Cc: Richard Hughes <hughsient@gmail.com>
include/linux/input.h