All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matjaz Hegedic <matjaz.hegedic@gmail.com>
To: jikos@kernel.org
Cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org,
	Matjaz Hegedic <matjaz.hegedic@gmail.com>
Subject: [PATCH v2 3/3] HID: asus: change mapping from KEY_WLAN to KEY_RFKILL
Date: Thu,  9 Mar 2017 00:31:15 +0100	[thread overview]
Message-ID: <1489015875-3558-3-git-send-email-matjaz.hegedic@gmail.com> (raw)
In-Reply-To: <1489015875-3558-1-git-send-email-matjaz.hegedic@gmail.com>

The input mapping code incorrectly maps the Airplane Mode button to
KEY_WLAN, which stands for WiFi toggle, but doesn't affect Bluetooth
(and other active radios) which is expected behavior for Airplane
Mode.

The fix replaces KEY_WLAN with the more appropriate KEY_RFKILL.

The declared usage code 0x88 corresponds to Airplane Mode button on
all keyboards handled by hid-asus (I2C netbook keyboards and USB
RoG series keyboards), so the fix doesn't introduce any
inconsistencies across different models.

Signed-off-by: Matjaz Hegedic <matjaz.hegedic@gmail.com>
---
 drivers/hid/hid-asus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index e0de54b..bacba97 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -226,7 +226,7 @@ static int asus_input_mapping(struct hid_device *hdev,
 		case 0x35: asus_map_key_clear(KEY_DISPLAY_OFF);		break;
 		case 0x6c: asus_map_key_clear(KEY_SLEEP);		break;
 		case 0x82: asus_map_key_clear(KEY_CAMERA);		break;
-		case 0x88: asus_map_key_clear(KEY_WLAN);			break;
+		case 0x88: asus_map_key_clear(KEY_RFKILL);			break;
 		case 0xb5: asus_map_key_clear(KEY_CALC);			break;
 		case 0xc4: asus_map_key_clear(KEY_KBDILLUMUP);		break;
 		case 0xc5: asus_map_key_clear(KEY_KBDILLUMDOWN);		break;
-- 
2.7.4


  parent reply	other threads:[~2017-03-08 23:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 23:31 [PATCH v2 1/3] HID: asus: fix and generalize ambiguous preprocessor macros Matjaz Hegedic
2017-03-08 23:31 ` [PATCH v2 2/3] HID: asus: ignore declared dummy usages Matjaz Hegedic
2017-03-08 23:31 ` Matjaz Hegedic [this message]
2017-03-13 13:17   ` [PATCH v2 3/3] HID: asus: change mapping from KEY_WLAN to KEY_RFKILL Benjamin Tissoires
2017-03-21 14:29 ` [PATCH v2 1/3] HID: asus: fix and generalize ambiguous preprocessor macros Jiri Kosina

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=1489015875-3558-3-git-send-email-matjaz.hegedic@gmail.com \
    --to=matjaz.hegedic@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.