[PATCH 12/16] INPUT: add a new EV_SW SW_RADIO event, for radio switches on laptops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Acked-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Cc: Ivo van Doorn <ivdoorn@xxxxxxxxx>
Cc: Richard Hughes <hughsient@xxxxxxxxx>
---
 include/linux/input.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/input.h b/include/linux/input.h
index be2bf3a..48f1ad6 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -603,6 +603,7 @@ struct input_absinfo {
 #define SW_LID			0x00  /* set = lid shut */
 #define SW_TABLET_MODE		0x01  /* set = tablet mode */
 #define SW_HEADPHONE_INSERT	0x02  /* set = inserted */
+#define SW_RADIO		0x03  /* set = radio enabled */
 #define SW_MAX			0x0f
 
 /*
-- 
1.5.2.1

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux