From: Matthew Garrett <mjg@redhat.com>
To: linux-input@vger.kernel.org
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org,
dmitry.torokhov@gmail.com, Matthew Garrett <mjg@redhat.com>
Subject: [PATCH 2/2] rfkill: Add support for KEY_RFKILL_ALL
Date: Sat, 1 Aug 2009 19:54:19 +0100 [thread overview]
Message-ID: <1249152859-14769-2-git-send-email-mjg@redhat.com> (raw)
In-Reply-To: <1249152859-14769-1-git-send-email-mjg@redhat.com>
Add support for handling KEY_RFKILL_ALL in the rfkill input module. This
simply toggles the state of all rfkill devices.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
net/rfkill/input.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/net/rfkill/input.c b/net/rfkill/input.c
index a7295ad..5517089 100644
--- a/net/rfkill/input.c
+++ b/net/rfkill/input.c
@@ -212,6 +212,12 @@ static void rfkill_event(struct input_handle *handle, unsigned int type,
case KEY_WIMAX:
rfkill_schedule_toggle(RFKILL_TYPE_WIMAX);
break;
+ case KEY_RFKILL_ALL:
+ rfkill_schedule_toggle(RFKILL_TYPE_WLAN);
+ rfkill_schedule_toggle(RFKILL_TYPE_BLUETOOTH);
+ rfkill_schedule_toggle(RFKILL_TYPE_UWB);
+ rfkill_schedule_toggle(RFKILL_TYPE_WIMAX);
+ break;
}
} else if (type == EV_SW && code == SW_RFKILL_ALL)
rfkill_schedule_evsw_rfkillall(data);
@@ -295,6 +301,11 @@ static const struct input_device_id rfkill_ids[] = {
.keybit = { [BIT_WORD(KEY_WIMAX)] = BIT_MASK(KEY_WIMAX) },
},
{
+ .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
+ .evbit = { BIT_MASK(EV_KEY) },
+ .keybit = { [BIT_WORD(KEY_RFKILL_ALL)] = BIT_MASK(KEY_RFKILL_ALL) },
+ },
+ {
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_SWBIT,
.evbit = { BIT(EV_SW) },
.swbit = { [BIT_WORD(SW_RFKILL_ALL)] = BIT_MASK(SW_RFKILL_ALL) },
--
1.6.2.5
next prev parent reply other threads:[~2009-08-01 18:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 18:54 [PATCH 1/2] input: Add KEY_RFKILL_ALL Matthew Garrett
2009-08-01 18:54 ` Matthew Garrett [this message]
2009-08-01 20:25 ` [PATCH 2/2] rfkill: Add support for KEY_RFKILL_ALL Bastien Nocera
2009-08-01 20:41 ` Marcel Holtmann
2009-08-01 20:38 ` [PATCH 1/2] input: Add KEY_RFKILL_ALL Marcel Holtmann
2009-08-01 20:45 ` Matthew Garrett
2009-08-01 20:52 ` Marcel Holtmann
2009-08-01 20:54 ` Matthew Garrett
2009-08-01 21:48 ` Marcel Holtmann
2009-08-01 21:51 ` Matthew Garrett
2009-08-01 22:11 ` Marcel Holtmann
2009-08-01 22:25 ` Matthew Garrett
2009-08-02 7:55 ` Johannes Berg
2009-08-02 1:05 ` Henrique de Moraes Holschuh
2009-08-02 1:15 ` Matthew Garrett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1249152859-14769-2-git-send-email-mjg@redhat.com \
--to=mjg@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-input@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).