Skip to content

Commit

Permalink
Input: add a new EV_SW SW_RADIO event, for radio switches on laptops
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Henrique de Moraes Holschuh authored and Dmitry Torokhov committed Jun 29, 2007
1 parent 33143ea commit c77da17
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down

0 comments on commit c77da17

Please sign in to comment.