Add patches accepted for 2.6.23-rc1
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / releases / upstream / 2.6.23-rc1 / 0012-Input-add-a-new-EV_SW-SW_RADIO-event-for-radio-swi.patch
blob398d52b78006e472969bd1d012b927d01d550413
1 From c77da1780325d889cac98e8179449ddf54e71ce0 Mon Sep 17 00:00:00 2001
2 From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
3 Date: Fri, 29 Jun 2007 01:08:49 -0400
4 Subject: Input: add a new EV_SW SW_RADIO event, for radio switches on laptops
6 Many laptops have rf-kill physical switches that are not keys, but slider
7 or rocker switches. Often (like in all ThinkPads with a radio kill slider
8 switch), they have both a slider/rocker switch and a hot key.
10 Trying to kludge a real switch to act like a key is not a very smart thing
11 to do if you can help it, and it gets specially bad when you are going to
12 have both in the same machine. So, we do the right thing and add an input
13 EV_SW event for radio kill switches.
15 The EV_SW SW_RADIO event is defined with positive logic, i.e. when the
16 switch is active, the radios are to be enabled. When the switch is
17 inactive, the radios are to be disabled.
19 Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
20 Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
21 ---
22 include/linux/input.h | 1 +
23 1 files changed, 1 insertions(+), 0 deletions(-)
25 diff --git a/include/linux/input.h b/include/linux/input.h
26 index be2bf3a..48f1ad6 100644
27 --- a/include/linux/input.h
28 +++ b/include/linux/input.h
29 @@ -603,6 +603,7 @@ struct input_absinfo {
30 #define SW_LID 0x00 /* set = lid shut */
31 #define SW_TABLET_MODE 0x01 /* set = tablet mode */
32 #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
33 +#define SW_RADIO 0x03 /* set = radio enabled */
34 #define SW_MAX 0x0f
37 --
38 1.5.2.1