From patchwork Wed Mar 8 23:31:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matjaz Hegedic X-Patchwork-Id: 9612111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 581666016C for ; Wed, 8 Mar 2017 23:40:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4744128633 for ; Wed, 8 Mar 2017 23:40:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3801428640; Wed, 8 Mar 2017 23:40:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D210328633 for ; Wed, 8 Mar 2017 23:40:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753963AbdCHXkv (ORCPT ); Wed, 8 Mar 2017 18:40:51 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36004 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753926AbdCHXkv (ORCPT ); Wed, 8 Mar 2017 18:40:51 -0500 Received: by mail-wm0-f65.google.com with SMTP id v190so8465263wme.3 for ; Wed, 08 Mar 2017 15:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0uS9nrdoyF4Spdm0lZOrG/zhJgJxTJTA2eomt56Xtk0=; b=IRl3nM6zEcGbq6xWo1/hDnfuBcwTMluwkm4GEHY8Urhbm7Uzqv0WG2hdvmoaK+fbLI Eo0obOIqrj+qC2FRyD0ognBnLiMOEd1LaOjlQl5oAW9IwUbEybM8kbGRG8VPpdq0j31g vxy8X8jaGA1LleWtsUqiu2tggSYGMExtTVgdVWzPAqgBjdKHt3BvKW2qiBxnJtB3peXD yyjzskraZrZ4ad29xJY1tj4j9X9o+m7X6+oLRfmlvY9pCWgd8m2YvGQEW8oXD9Paii6O earORgzu4atRJ69ZRNGEOpnUZO8u4/XjFOyURszMbNXd937RFhNwcMEDAomw8IpVeus3 8QCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0uS9nrdoyF4Spdm0lZOrG/zhJgJxTJTA2eomt56Xtk0=; b=shjr4Kp9bXjWFfaSU6t8PThCz9fYPkVMS9ojGptSREWbHbkR3UGA5J8GUwGCavwj8u MSMFUCaAM8mY6EGvNLGiThVzc6F54OartXJopVYedaSe3IdGcB9z34X5BGQelQcMlLs0 9m5RlYN/Gae26YhsOfGwZaQ/x+TACBrxJohmodE8FntTUnpfU88XJNa28TnfwUwYIoQu Kr0QDzeBD59B6scbHvL/Wdte9AYmGW0Ae8ZJOOudyE2nkxXgACptWRzWFve9aED780aI fEtjR6SSa+6Zs974vHSLdXvHt2Qy06AUtyypPZoW355IKkV0pL+LSTEeeVflte4NQy/6 1HrQ== X-Gm-Message-State: AMke39kdzUf66zC+gBET6MolqNHLNRx3I/0q5ZH5LGfQgWfz2UzmMayk7TfJ+NoNAN1Wog== X-Received: by 10.28.55.68 with SMTP id e65mr8094801wma.62.1489015908628; Wed, 08 Mar 2017 15:31:48 -0800 (PST) Received: from X205TA.upc.at (213-47-29-34.cable.dynamic.surfer.at. [213.47.29.34]) by smtp.gmail.com with ESMTPSA id x23sm6010430wrb.49.2017.03.08.15.31.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Mar 2017 15:31:47 -0800 (PST) From: Matjaz Hegedic To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, Matjaz Hegedic Subject: [PATCH v2 3/3] HID: asus: change mapping from KEY_WLAN to KEY_RFKILL Date: Thu, 9 Mar 2017 00:31:15 +0100 Message-Id: <1489015875-3558-3-git-send-email-matjaz.hegedic@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489015875-3558-1-git-send-email-matjaz.hegedic@gmail.com> References: <1489015875-3558-1-git-send-email-matjaz.hegedic@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Benjamin Tissoires --- 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;