diff mbox

[1/2] input: Add KEY_RFKILL

Message ID 1252603292-20830-1-git-send-email-mjg@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Matthew Garrett Sept. 10, 2009, 5:21 p.m. UTC
Most laptops have keys that are intended to toggle all device state, not
just wifi. These are currently generally mapped to KEY_WLAN. As a result,
rfkill will only kill or enable wifi in response to the key press. This
confuses users and can make it difficult for them to enable bluetooth
and wwan devices.

This patch adds a new keycode, KEY_RFKILL_ALL. It indicates that the
system should toggle the state of all rfkillable devices.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 include/linux/input.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Luis Rodriguez Sept. 10, 2009, 5:27 p.m. UTC | #1
On Thu, Sep 10, 2009 at 10:21 AM, Matthew Garrett <mjg@redhat.com> wrote:

> This patch adds a new keycode, KEY_RFKILL_ALL.

>  include/linux/input.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

> +#define KEY_RFKILL             0x20c /* Key that controls all radios */

But this above is KEY_RFKILL, not KEY_RKILL_ALL. Typo?

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Matthew Garrett Sept. 10, 2009, 5:31 p.m. UTC | #2
On Thu, Sep 10, 2009 at 10:27:01AM -0700, Luis R. Rodriguez wrote:
> On Thu, Sep 10, 2009 at 10:21 AM, Matthew Garrett <mjg@redhat.com> wrote:
> 
> > This patch adds a new keycode, KEY_RFKILL_ALL.
> 
> >  include/linux/input.h |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> > +#define KEY_RFKILL             0x20c /* Key that controls all radios */
> 
> But this above is KEY_RFKILL, not KEY_RKILL_ALL. Typo?

Sorry, yes - forgot to update the commit message to match the change in 
the patch and subject.
Dmitry Torokhov Sept. 11, 2009, 5:13 a.m. UTC | #3
On Thu, Sep 10, 2009 at 06:21:31PM +0100, Matthew Garrett wrote:
> Most laptops have keys that are intended to toggle all device state, not
> just wifi. These are currently generally mapped to KEY_WLAN. As a result,
> rfkill will only kill or enable wifi in response to the key press. This
> confuses users and can make it difficult for them to enable bluetooth
> and wwan devices.
> 
> This patch adds a new keycode, KEY_RFKILL_ALL. It indicates that the

The new name in description does not match the code...

> system should toggle the state of all rfkillable devices.

Hmm, rfkill changes usually go through net tree so unless they want me
to push it though I'll just ACK the new keycode.

> 
> Signed-off-by: Matthew Garrett <mjg@redhat.com>

Acked-by: Dmitry Torokhov <dtor@mail.ru>

> ---
>  include/linux/input.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/input.h b/include/linux/input.h
> index 8b3bc3e..20a622e 100644
> --- a/include/linux/input.h
> +++ b/include/linux/input.h
> @@ -595,6 +595,8 @@ struct input_absinfo {
>  #define KEY_NUMERIC_STAR	0x20a
>  #define KEY_NUMERIC_POUND	0x20b
>  
> +#define KEY_RFKILL		0x20c /* Key that controls all radios */
> +
>  /* We avoid low common keys in module aliases so they don't get huge. */
>  #define KEY_MIN_INTERESTING	KEY_MUTE
>  #define KEY_MAX			0x2ff
diff mbox

Patch

diff --git a/include/linux/input.h b/include/linux/input.h
index 8b3bc3e..20a622e 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -595,6 +595,8 @@  struct input_absinfo {
 #define KEY_NUMERIC_STAR	0x20a
 #define KEY_NUMERIC_POUND	0x20b
 
+#define KEY_RFKILL		0x20c /* Key that controls all radios */
+
 /* We avoid low common keys in module aliases so they don't get huge. */
 #define KEY_MIN_INTERESTING	KEY_MUTE
 #define KEY_MAX			0x2ff