From patchwork Fri Jan 18 23:30:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10771805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79BEF139A for ; Fri, 18 Jan 2019 23:30:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6563D30950 for ; Fri, 18 Jan 2019 23:30:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5942930984; Fri, 18 Jan 2019 23:30:43 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 082BB30950 for ; Fri, 18 Jan 2019 23:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730117AbfARXam (ORCPT ); Fri, 18 Jan 2019 18:30:42 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38807 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729842AbfARXam (ORCPT ); Fri, 18 Jan 2019 18:30:42 -0500 Received: by mail-pg1-f193.google.com with SMTP id g189so6753169pgc.5; Fri, 18 Jan 2019 15:30:41 -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:mime-version :content-transfer-encoding; bh=kNUf+iB/LoK2OdmSM9fbNdTqLzr17MC+P0LbuoGYOrI=; b=WZHXE0YFfXV5zDSuK4FfeEGDlRf5P7cjbnqBHEiNsKXSxuB7aohCDLJYX+743V2qkC swY79GOejVcsH+LZwNsJnON3pKxbChQA+SQ73a7UH5fZAQboITfCNZ5w4CZHv1XrFSAH Qpg1wlbUBcrJij0lpyGKedLcird1NXhr/8D+4RrVUUd6uS1qzrBLZwvMSVug03I7dv0y ZeM+2kDBTlpExs2hwEH5VJ0dmCJaWrj8UsF2cvvIgusmMV0mm9RkRtJ5ZSwWufv3HJ/e 6ed53Sw1dj9ouhHKEkFC7WJny6Q76a14FJ3ezlimyEAhZNPTT7rUBSoqryXBWmDAmDkc wGgw== 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:mime-version :content-transfer-encoding; bh=kNUf+iB/LoK2OdmSM9fbNdTqLzr17MC+P0LbuoGYOrI=; b=fgV0NupRm0J72SUgjpFS1uCNgMv/QfB/fkXlE4bn3mSmKcQdMFFiw02TXZXKnQmGZy EK2w04kmPAM+2Fym3jOO66dTKb5eJbSA2y1W1HfzoyzjBYjkVJGU0cXqL3tyEbX2Cmsb ayNGmMmHtI4s+iBCL4sk1PpZLpiGPpvWscOPOfo/z1HZbjmfz2ZurvWCYK4DqVQmABmq sOd0FryzlW7f6UPoCk1Hi54g7o6G4lv59imf0xTpFbctTfy6gIEWeRpGq8mK6MGAy0u6 W9/NkzRf3RPMYtpHwXy5B6C8HZhZjJga+e+KS1QSunmjFf94PdR7q3lYqjLYDuwVQrI2 LdRw== X-Gm-Message-State: AJcUukdGPBInzQE3LyueQkJova1TiVVEmbD2j8hiHAaDA2YpFF9esLUp SczrZ+AvDZlI+yb/ZvGq6zY= X-Google-Smtp-Source: ALg8bN565phsMfeWZ0mzQWQ/sKuk3Yy/nU8e/MFubEzfkAUeIoeFiHxxUK+oS8spJvZaZP3rNr+6oQ== X-Received: by 2002:a63:334a:: with SMTP id z71mr19807787pgz.400.1547854240660; Fri, 18 Jan 2019 15:30:40 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id f6sm11857163pfg.188.2019.01.18.15.30.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 15:30:40 -0800 (PST) From: Dmitry Torokhov To: Jiri Kosina , Benjamin Tissoires Cc: Mauro Carvalho Chehab , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 1/7] Input: document meanings of KEY_SCREEN and KEY_ZOOM Date: Fri, 18 Jan 2019 15:30:31 -0800 Message-Id: <20190118233037.87318-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog MIME-Version: 1.0 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 It is hard to say what KEY_SCREEN and KEY_ZOOM mean, but historically DVB folks have used them to indicate switch to full screen mode. Later, they converged on using KEY_ZOOM to switch into full screen mode and KEY)SCREEN to control aspect ratio (see Documentation/media/uapi/rc/rc-tables.rst). Let's commit to these uses, and define: - KEY_FULL_SCREEN (and make KEY_ZOOM its alias) - KEY_ASPECT_RATIO (and make KEY_SCREEN its alias) Signed-off-by: Dmitry Torokhov Acked-by: Jiri Kosina Acked-by: Benjamin Tissoires Acked-by: Mauro Carvalho Chehab --- Please let me know how we want merge this. Some of patches can be applied independently and I tried marking them as such, but some require new key names from input.h include/uapi/linux/input-event-codes.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index ae366b87426a..bc5054e51bef 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -439,10 +439,12 @@ #define KEY_TITLE 0x171 #define KEY_SUBTITLE 0x172 #define KEY_ANGLE 0x173 -#define KEY_ZOOM 0x174 +#define KEY_FULL_SCREEN 0x174 /* AC View Toggle */ +#define KEY_ZOOM KEY_FULL_SCREEN #define KEY_MODE 0x175 #define KEY_KEYBOARD 0x176 -#define KEY_SCREEN 0x177 +#define KEY_ASPECT_RATIO 0x177 /* HUTRR37: Aspect */ +#define KEY_SCREEN KEY_ASPECT_RATIO #define KEY_PC 0x178 /* Media Select Computer */ #define KEY_TV 0x179 /* Media Select TV */ #define KEY_TV2 0x17a /* Media Select Cable */ From patchwork Fri Jan 18 23:30:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10771819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B4E813BF for ; Fri, 18 Jan 2019 23:31:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CEA730984 for ; Fri, 18 Jan 2019 23:31:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2168530986; Fri, 18 Jan 2019 23:31:22 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 C7E7230984 for ; Fri, 18 Jan 2019 23:31:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730279AbfARXbP (ORCPT ); Fri, 18 Jan 2019 18:31:15 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:45609 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730115AbfARXam (ORCPT ); Fri, 18 Jan 2019 18:30:42 -0500 Received: by mail-pl1-f196.google.com with SMTP id a14so6972890plm.12; Fri, 18 Jan 2019 15:30: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 :mime-version:content-transfer-encoding; bh=tILAUjKy4+5QmA7cKr1Y9UyKRlK9bcmdZJH0+ju/KnI=; b=QHpMgtM+oz03m9EzvSgVU6jBMUPCSMve87QxryhQuBBrRf1k1LCLsfcrtUPbZ9WdSq +qerKqWG2bOJ7vU96ybpRcyMA8hr6KJLRijEZn2yaeiTaxWk5LgoqhRu8rqfDdeZu33p xQCM2fDzHuy5T8iqI/+ON+ay/Bi7iVXznEkDNZWfz07Rxkw3tSyFWd3o6P5ZtxhkWsTx Hsj5f4Q+QBtdVru2CPk0unG3POJZVrnhLpbAcVUagjlvO/e7BUGSrlDPzEeIGex7zZvt VOKYsivBf0VNfXUCuC9jqZKtqeKyI7x43cn7tboZzBvTcPZh6n3YoD04qWt2/UUs50F0 5WXg== 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:mime-version:content-transfer-encoding; bh=tILAUjKy4+5QmA7cKr1Y9UyKRlK9bcmdZJH0+ju/KnI=; b=DPXK8/3yW2Xvquw2QOz3VLkCxmPNYeJDbR9y+MMlNtlBbfSzVyucxBrKQyeuSSRAVC hXQ2mLFXfMENuvUhJW7B6f9PaVwed4bnpUL8g1TsvWRV6sYPpojyuu5Z6SOuE6a3rWZ1 /eRg8nlkFAVbViioyNcs8l5/zxYnhDi++DdSdSg4DBDJtGK5JP5qaUNplyn7vEEeZdLy fHjE4vOV68tNmXcgFhu2wQm6LxK/Eu/T0iJnY5xTeUdKbWL5rIOgbw4dhAjAIC2YFOdF 6xmI1OqgCA7lWXywSK1/gNjx3X1hXoljCXKliHtrCrfYWRnHcvq4qAbdl/0Jx2tPZDN/ BMfQ== X-Gm-Message-State: AJcUukdBA09sD2wBNWQV8BSjNMCvH+nag2Frm0pPS+gfVNcX8rILO9Gg bE5/KlcpnWMDXKGp0t+6ID/OlSdp X-Google-Smtp-Source: ALg8bN5VEagiDKQwIiUcPeGMlaX1SaKu/WMXQmrfjl2jZRezLaDOo2KEESA4A42gtb2/joNGblHi+w== X-Received: by 2002:a17:902:7005:: with SMTP id y5mr21062746plk.7.1547854241595; Fri, 18 Jan 2019 15:30:41 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id f6sm11857163pfg.188.2019.01.18.15.30.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 15:30:41 -0800 (PST) From: Dmitry Torokhov To: Mauro Carvalho Chehab Cc: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 2/7] [media] doc-rst: switch to new names for Full Screen/Aspect keys Date: Fri, 18 Jan 2019 15:30:32 -0800 Message-Id: <20190118233037.87318-2-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog In-Reply-To: <20190118233037.87318-1-dmitry.torokhov@gmail.com> References: <20190118233037.87318-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 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 We defined better names for keys to activate full screen mode or change aspect ratio (while keeping the existing keycodes to avoid breaking userspace), so let's use them in the document. Signed-off-by: Dmitry Torokhov Acked-by: Mauro Carvalho Chehab --- Documentation/media/uapi/rc/rc-tables.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/media/uapi/rc/rc-tables.rst b/Documentation/media/uapi/rc/rc-tables.rst index c8ae9479f842..57797e56f45e 100644 --- a/Documentation/media/uapi/rc/rc-tables.rst +++ b/Documentation/media/uapi/rc/rc-tables.rst @@ -616,7 +616,7 @@ the remote via /dev/input/event devices. - .. row 78 - - ``KEY_SCREEN`` + - ``KEY_ASPECT_RATIO`` - Select screen aspect ratio @@ -624,7 +624,7 @@ the remote via /dev/input/event devices. - .. row 79 - - ``KEY_ZOOM`` + - ``KEY_FULL_SCREEN`` - Put device into zoom/full screen mode From patchwork Fri Jan 18 23:30:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10771807 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05815139A for ; Fri, 18 Jan 2019 23:30:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E934530950 for ; Fri, 18 Jan 2019 23:30:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD59A30984; Fri, 18 Jan 2019 23:30:46 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 91FE130950 for ; Fri, 18 Jan 2019 23:30:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730191AbfARXao (ORCPT ); Fri, 18 Jan 2019 18:30:44 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:44074 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729842AbfARXan (ORCPT ); Fri, 18 Jan 2019 18:30:43 -0500 Received: by mail-pl1-f196.google.com with SMTP id e11so6978113plt.11; Fri, 18 Jan 2019 15:30:43 -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 :mime-version:content-transfer-encoding; bh=Da91/n9DUgE7qrDB5BTP/g0fCKFOWWyecOgir9w/o6A=; b=jqGuJd8mIM0DpcLWzq+lfpcEXyMvaC+Up0KKuuc+uS1wiV3SPF+JHl5ioL1vqr2Ee7 4cgKu33ztLGUyIFjK0Rk5LIbUIipSqqmzX1/xvPHPYTKPD3SSGtHO3siPSO5br6EPdma TBnR15PHV4YRmAKPQnXDX50rBNXIaKIdWZdqonPM/5/ctXGUjNPkQsbDp4v37fzfIwHM wBzDQa+ibeXH0+DrSb38YMvPa2rZvD0qdB+yIDQKjdvJSssEqJ3ksHxe+odfKdwgo8DB AaNPpMUjKrFDNMux2xd9ePRr2I5bU5dpZV2QhssLqPauhvmuqaJhFpEJs/gq26SNHhDc x/5w== 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:mime-version:content-transfer-encoding; bh=Da91/n9DUgE7qrDB5BTP/g0fCKFOWWyecOgir9w/o6A=; b=Y8A25aSEkhatar3u2hsahqVgcn9h4RKgagI3VoNzxecyeSJnNXuUKm70EE90vFCkCl qr6S8Cuq/hLPNxFytKTnZl+9UYVqT2VOPHEKkTK7nS+fPt5WG2aXhJzXxk65NsRDBQLn uhiUWyw7XuZp6M00bNfShwOWbeyaSLrRT5DZmYyrpumCgT11o557Ox7j1udiQgrhsJfu kbWUEeh9nmBXGCgQfUsKCpQWrv6kKwrloD6PtLWfOGnc6GPIQyQlOQbiUoUtIc/uztwm hmZYxiPXEUhirPPoZgVa3xt5IZ4lI4U160jdlDDTcxatw1L+9lymu9Zokvtf0tL1VVjf 9EfA== X-Gm-Message-State: AJcUukcFNnDlmiDYUHsV33G+UBBrw+9Kjnb9bKH5OMclran+b6bN2s5k NKlKBnUuQ2Lgf0RTRLA17Ow= X-Google-Smtp-Source: ALg8bN76KKgxeOhx1ElB1M9jzBiAqyQyc1ss/LWRjBYkvaqKSYcrV+cIGEW+5XYcSeQgDkDpxX9lSQ== X-Received: by 2002:a17:902:830a:: with SMTP id bd10mr21001011plb.321.1547854242450; Fri, 18 Jan 2019 15:30:42 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id f6sm11857163pfg.188.2019.01.18.15.30.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 15:30:41 -0800 (PST) From: Dmitry Torokhov To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH 3/7] HID: input: fix mapping of aspect ratio key Date: Fri, 18 Jan 2019 15:30:33 -0800 Message-Id: <20190118233037.87318-3-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog In-Reply-To: <20190118233037.87318-1-dmitry.torokhov@gmail.com> References: <20190118233037.87318-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 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 According to HUTRR37 usage 0x6d from the consumer usage page corresponds to action that selects the next available supported aspect ratio option on a device which outputs or displays video. However KEY_ZOOM means activate "Full Screen" mode, KEY_ASPECT_RATIO should be used instead. Signed-off-by: Dmitry Torokhov --- drivers/hid/hid-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index d6fab5798487..def58c6aa835 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -891,7 +891,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel case 0x06a: map_key_clear(KEY_GREEN); break; case 0x06b: map_key_clear(KEY_BLUE); break; case 0x06c: map_key_clear(KEY_YELLOW); break; - case 0x06d: map_key_clear(KEY_ZOOM); break; + case 0x06d: map_key_clear(KEY_ASPECT_RATIO); break; case 0x06f: map_key_clear(KEY_BRIGHTNESSUP); break; case 0x070: map_key_clear(KEY_BRIGHTNESSDOWN); break; From patchwork Fri Jan 18 23:30:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10771815 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D14F8139A for ; Fri, 18 Jan 2019 23:31:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C29B730984 for ; Fri, 18 Jan 2019 23:31:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6E4530986; Fri, 18 Jan 2019 23:31:09 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 6EB0E30984 for ; Fri, 18 Jan 2019 23:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730155AbfARXbI (ORCPT ); Fri, 18 Jan 2019 18:31:08 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40073 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730188AbfARXao (ORCPT ); Fri, 18 Jan 2019 18:30:44 -0500 Received: by mail-pl1-f196.google.com with SMTP id u18so6991865plq.7; Fri, 18 Jan 2019 15:30:44 -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 :mime-version:content-transfer-encoding; bh=3ga+oVqHLm0lhA1fwqdUImX2t8PWwD8cjXiVk50icN8=; b=W1w1TXBCGuopLfkanOl9XZW3ZUDryRB+Ze8+SZsvH8SKGavMTHWiGxqC+u6Pg5L9iu R3d4kmezOtX6uH3FdJRUdBuK2IJNv8lLJWj8skF80M4L+5cTlelznYk5d6qzkLDhMbEf Csdsjb8xyIdAatH+3KxnxrIdgxpq570CrE+gsXGYNciRqFjWPC7+7jc4KnMPdQqLPyRK J2bjvsjLT5Pvp8TkYy4l5XyLHH5KzVBkZPfAKiBKqfTDVlgmJ6AIe1UCpm7iNnzYPb9B ZyTtTYlHF4rsAK7nDBOv9cy951NqKo8F4KED0bcyJi94J99BOAiaXstt9hctpJLQmqNS vaYg== 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:mime-version:content-transfer-encoding; bh=3ga+oVqHLm0lhA1fwqdUImX2t8PWwD8cjXiVk50icN8=; b=Gnox6+A/2cwy2AFBztX3dLgv3ou/aBN75l5f8WmkDDquFKaYfWjS51do93Bl0NL+sP JYch4T0+Fl0fzp7q9WxjjPBpzi8EkpiEk83YgjgbZRsqLe0TVLzEz0sipvDicsdWatsx vnaDdCqNxJyivVw+mkBIA6RwPt73fGIhCP/miU7fJczlTxEXwl2SXFl7zh0YGmEZyQes hy8HANkhGjqHOgZdSGKu1Ob0KwBisVS951QeuHj2CYrvztDVsGJI5moT49SFALjwjFHZ rvgMUyPKYMS4Otz0qoYNQ5JnVWmsoBsDfIgLJoHE5Skj6o1ZMBVJBJlspVDNo7erhftY HWmg== X-Gm-Message-State: AJcUuketLREyDYZExYjZFOYeGiJbW+cJzLESoIs8s0Hm+6hfFlfypzsG wdZiKwYWgXisJKHkbx2k53w= X-Google-Smtp-Source: ALg8bN6fbh6bvT7Djf5MUXW2LSztuYm5FevAb/KhsPyZCD01dYDZEkj0qmadHEwqy3f5jg4dhqSITg== X-Received: by 2002:a17:902:848d:: with SMTP id c13mr21059934plo.257.1547854243292; Fri, 18 Jan 2019 15:30:43 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id f6sm11857163pfg.188.2019.01.18.15.30.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 15:30:42 -0800 (PST) From: Dmitry Torokhov To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] HID: input: add mapping for Expose/Overview key Date: Fri, 18 Jan 2019 15:30:34 -0800 Message-Id: <20190118233037.87318-4-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog In-Reply-To: <20190118233037.87318-1-dmitry.torokhov@gmail.com> References: <20190118233037.87318-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 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 According to HUTRR77 usage 0x29f from the consumer page is reserved for the Desktop application to present all running user’s application windows. Linux defines KEY_SCALE to request Compiz Scale (Expose) mode, so let's add the mapping. Signed-off-by: Dmitry Torokhov --- This can be applied independently. drivers/hid/hid-input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index def58c6aa835..5f800e7b04f2 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1030,6 +1030,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel case 0x2cb: map_key_clear(KEY_KBDINPUTASSIST_ACCEPT); break; case 0x2cc: map_key_clear(KEY_KBDINPUTASSIST_CANCEL); break; + case 0x29f: map_key_clear(KEY_SCALE); break; + default: map_key_clear(KEY_UNKNOWN); } break; From patchwork Fri Jan 18 23:30:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10771811 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DB5C513BF for ; Fri, 18 Jan 2019 23:31:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC5A030984 for ; Fri, 18 Jan 2019 23:31:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0B1530986; Fri, 18 Jan 2019 23:31:06 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 6D1AC30984 for ; Fri, 18 Jan 2019 23:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730240AbfARXaz (ORCPT ); Fri, 18 Jan 2019 18:30:55 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:42798 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730192AbfARXap (ORCPT ); Fri, 18 Jan 2019 18:30:45 -0500 Received: by mail-pl1-f194.google.com with SMTP id y1so6985784plp.9; Fri, 18 Jan 2019 15:30:44 -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 :mime-version:content-transfer-encoding; bh=ldH8+mC8u22aK1nS5Q+1DGD8yOUPj+mC0pR+mip+tQo=; b=dWxgfNZMXrjv+1tdVjSv5pSXxBfEjSZY+bPioJnEyANWx/NpxFRjuL7FAAdPGE9g1s ++mIdpro9b93CVhZhD6agaxSaWTby6/Guyy5ehPFR0/Qqs1Nz9vitywy9UMtkQ4M5M+P bxj4s5Wc5rqMw+s0o1+VzsHmMe58ovtIYRkaK6GRkUb/KxDtNgSd9aAegl8k9qA4Ae/P j4fueiami+641sbci6sCjyP4oT7iroxAfUc+gu+ruZNOp+l/4XpYtay/HZS4zipvYTYn s9fGQDsL/Awwzm3VO1AanlgiZrsxo5+lesyWzKdRMvZJpakFYqtnau2w3Xvrc5Ot3cva /xIQ== 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:mime-version:content-transfer-encoding; bh=ldH8+mC8u22aK1nS5Q+1DGD8yOUPj+mC0pR+mip+tQo=; b=f1T9qEjOJ3ImZ8D9pNYS7GBYGgWB6yF6AZz/S3MqnN1tB3YO8X1yLeYozCBYIAVkSX GHy0LtEtLpAqzl7RZjVuj67f1lnKMkE37NBd/pZ+SJaXP+aXA5aBxcd7wuI8DtcpSIkZ 9mYx1lLNiF21fYW9VguhCQKJxzt6y+oAmWUR0T48aFJw+y/qPbV26+3vvvvTf38smZjq sh0I5hl1Nuc/DFNpw53EOTI2zbLrHTe0p4bZNs6/qtOA0dnMOAvnZo/TqDufEZdhmUFY at5S7+om/vbgmszClhNiDoMMYdzooRokkl3R0FSoEVNwMjSa9P4TC9Hcn0aefrhRbO6e bl7w== X-Gm-Message-State: AJcUukcPXl8qNInc9aCXupa1H4FhvmLwFayD5PkSpPU5lTXAzRRioRCU ysnOKB53l9FvyUIfCSErLoY= X-Google-Smtp-Source: ALg8bN6bklIT+S6OtF/fxrUYw80pkP/FQRCXFEVpX3jt9LRchmgqeNyrPDkXIThkFPkgjnRvRDkPyw== X-Received: by 2002:a17:902:7443:: with SMTP id e3mr21087999plt.304.1547854244121; Fri, 18 Jan 2019 15:30:44 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id f6sm11857163pfg.188.2019.01.18.15.30.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 15:30:43 -0800 (PST) From: Dmitry Torokhov To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] HID: input: add mapping for keyboard Brightness Up/Down/Toggle keys Date: Fri, 18 Jan 2019 15:30:35 -0800 Message-Id: <20190118233037.87318-5-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog In-Reply-To: <20190118233037.87318-1-dmitry.torokhov@gmail.com> References: <20190118233037.87318-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 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 According to HUTRR73 usages 0x79, 0x7a and 0x7c from the consumer page correspond to Brightness Up/Down/Toggle keys, so let's add the mappings. Signed-off-by: Dmitry Torokhov --- This can be applied independently. drivers/hid/hid-input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 5f800e7b04f2..cebe8a8cce2e 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -900,6 +900,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel case 0x074: map_key_clear(KEY_BRIGHTNESS_MAX); break; case 0x075: map_key_clear(KEY_BRIGHTNESS_AUTO); break; + case 0x079: map_key_clear(KEY_KBDILLUMUP); break; + case 0x07a: map_key_clear(KEY_KBDILLUMDOWN); break; + case 0x07c: map_key_clear(KEY_KBDILLUMTOGGLE); break; + case 0x082: map_key_clear(KEY_VIDEO_NEXT); break; case 0x083: map_key_clear(KEY_LAST); break; case 0x084: map_key_clear(KEY_ENTER); break; From patchwork Fri Jan 18 23:30:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10771813 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E3A813BF for ; Fri, 18 Jan 2019 23:31:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EDF930984 for ; Fri, 18 Jan 2019 23:31:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22F2830986; Fri, 18 Jan 2019 23:31:09 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 C835D30984 for ; Fri, 18 Jan 2019 23:31:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730202AbfARXaz (ORCPT ); Fri, 18 Jan 2019 18:30:55 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:45613 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730194AbfARXap (ORCPT ); Fri, 18 Jan 2019 18:30:45 -0500 Received: by mail-pl1-f196.google.com with SMTP id a14so6972931plm.12; Fri, 18 Jan 2019 15:30:45 -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 :mime-version:content-transfer-encoding; bh=ApgiXS2bVmCTJmZTYf7Edh2FUNbmB207b8t5V0zCeQE=; b=aMV1bh4S94H+5vfO/QEBUO5NUa0R9FBiBnv16AESmgBVcblVmbhZw1ryxrJTr3IB94 chYVLM1Pb1eh7PYqxI74IzqpXxJvUt7kALp15gAOAxWBD265FuF2QJFwf2jUPwe1LfUL nG0SlKliR8NIG+UeCUR8eBZRDf2MAwr4c99Ckp8zz81mqtqNGZWuRhzFW0L6b2S4QBRL RTY+noSNDuC5kIeQ3EKk4PoDxVvuKxsq28q0+8eaQw0yvfE4+HT5iu3PMyEvV9esNfZM 4MnmIDbVdfZGRph1OgHXFRT5y9QELv+h5RmbaVQoG7P2ZC/u9WNrsQNT+U8paqIE73l6 /pdw== 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:mime-version:content-transfer-encoding; bh=ApgiXS2bVmCTJmZTYf7Edh2FUNbmB207b8t5V0zCeQE=; b=Z1INa2dn563JhDBAeL+P1UHEW6hRL1aRfx7r/MpMpVEVYuPJv6NT1pLhYUGQRE0JYn E5rZtvyPcOn6wiD/JkTlYziPs4syKqSUWqebXOctvr3SafAFt2MXhFzTLcYSR3KKCWAw f7GkhzhMH73YRNkClm5ku/U5Riqe1/Isdjpz5aUU9iu4i0KQsKfGI8xxWDOM+jN7R2Ej 0pkRvSloAqq3MnZJL5MAbszfpbGc8NhJMn+VI76jh13ULy6iKpUT/pSX0dLKbtKEsPrU bO/x7I4zTUYP4lHrewlWJNsQBUM3YyUHFRz+yITKKtOxXDvKhSXjociIBvAeAnmb21GF TyUg== X-Gm-Message-State: AJcUukfH+/aQdpPHQ4AeqUkcc3XLr8YRKzMuuy6Xlr3P32ldMZWyNAKV zaRsozcV2PHClkn10zM3wN4= X-Google-Smtp-Source: ALg8bN5BPVs+/Zj+6TZzT60gFxxM1RPhq2ZTaAz/91nSQNCG+F9T19vdDPKli/4VLI1jxdYf3DlClg== X-Received: by 2002:a17:902:2a66:: with SMTP id i93mr20642057plb.113.1547854244932; Fri, 18 Jan 2019 15:30:44 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id f6sm11857163pfg.188.2019.01.18.15.30.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 15:30:44 -0800 (PST) From: Dmitry Torokhov To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] HID: input: add mapping for "Full Screen" key Date: Fri, 18 Jan 2019 15:30:36 -0800 Message-Id: <20190118233037.87318-6-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog In-Reply-To: <20190118233037.87318-1-dmitry.torokhov@gmail.com> References: <20190118233037.87318-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 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 According to HUT 1.12 usage 0x232 from the consumer page is reserved for switching application between full screen and windowed mode, so let's add the mapping. Signed-off-by: Dmitry Torokhov --- This needs the new key definition. drivers/hid/hid-input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index cebe8a8cce2e..ecb1b6f26853 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1014,6 +1014,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel case 0x22d: map_key_clear(KEY_ZOOMIN); break; case 0x22e: map_key_clear(KEY_ZOOMOUT); break; case 0x22f: map_key_clear(KEY_ZOOMRESET); break; + case 0x232: map_key_clear(KEY_FULL_SCREEN); break; case 0x233: map_key_clear(KEY_SCROLLUP); break; case 0x234: map_key_clear(KEY_SCROLLDOWN); break; case 0x238: map_rel(REL_HWHEEL); break; From patchwork Fri Jan 18 23:30:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10771809 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56DA0139A for ; Fri, 18 Jan 2019 23:30:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4790D30950 for ; Fri, 18 Jan 2019 23:30:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BF4830984; Fri, 18 Jan 2019 23:30:54 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 E313530950 for ; Fri, 18 Jan 2019 23:30:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729842AbfARXas (ORCPT ); Fri, 18 Jan 2019 18:30:48 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46282 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730202AbfARXar (ORCPT ); Fri, 18 Jan 2019 18:30:47 -0500 Received: by mail-pl1-f195.google.com with SMTP id t13so6977136ply.13; Fri, 18 Jan 2019 15:30:46 -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 :mime-version:content-transfer-encoding; bh=XXL4qZP7YbRvfTyx9AD04ZGmWvKykJHmkbQQ6OFvsZo=; b=fHg4W+Trcy3uD0SB43ArWYO/iXEPyyn5KiyTgWefduIB5r5P1NjHQPPllvyELUfEG+ 3AsgEHD2aDDxy3AfestlcnJPUOK4vfSxt0tmRc3SjZASUJV3ye847p87oksOeX9w8CXc 8aM0wSfWLpBSUfpPInCJDyb+xu46y52Pyt7eS9vUYVYK4EQB3DaX60LAWPG0EHx9pMIP 362GkDxDfur4k2NMv+3ekh/G0ksx6WW1P0ffgrJWN2xIbFWKNXTTYjom8OSYS3/jELki D5fRXQTRzI3qtWOd7C50vYZpcUMYKLtyjkB2a2r/cOGgbHBBaotmjajCvwo0WENiAkYo DbRw== 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:mime-version:content-transfer-encoding; bh=XXL4qZP7YbRvfTyx9AD04ZGmWvKykJHmkbQQ6OFvsZo=; b=oWVGUjDcxKSpYgPch4qXew1iC328dkgwtE1eVtXjrFIMXdppVFU0Vt4WGJ4hk9jGsA CZ/VZAQ+NppbsLzg9o8X3axNzBdUGzlKIjKc5vbhKntRDZormEFyP/EvdBr73ofzNfLQ DNZMUeno6aRoakHHJK4JZ/gh1ieAj/z52kL2nKRpxBsegZsdYcp3M1B4BndLEyIa8PBu yujD25jtYLYMlykcKjrHrQi4dcVvjVrJXNxbZ0Oq6FamN6HJmlsIGdlHk96m40Zt0LR+ WymewsnZ+Lcyy35KlUtOS73axelNmORxDIZJBR2My5NLmDQL2oX/VFPI7JYcneyb0O2g WWRg== X-Gm-Message-State: AJcUuket7UNhiO9K4g4t+4EkLTusxiV+SLkMRr0Y9hPvDfCN4pacwxsM BD+Uc4vFBnqx/12JXfsG3Bc= X-Google-Smtp-Source: ALg8bN6I5Vds9SMLHv5qIACRsXKpuxAAlCpYuy65m82Ajv6icuqgWHuf6CkEKIX8LwIPR7dD+cxGtg== X-Received: by 2002:a17:902:850c:: with SMTP id bj12mr20713575plb.46.1547854245776; Fri, 18 Jan 2019 15:30:45 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id f6sm11857163pfg.188.2019.01.18.15.30.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 15:30:45 -0800 (PST) From: Dmitry Torokhov To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] HID: input: add mapping for "Toggle Display" key Date: Fri, 18 Jan 2019 15:30:37 -0800 Message-Id: <20190118233037.87318-7-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog In-Reply-To: <20190118233037.87318-1-dmitry.torokhov@gmail.com> References: <20190118233037.87318-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 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 According to HUT 1.12 usage 0xb5 from the generic desktop page is reserved for switching between external and internal display, so let's add the mapping. Signed-off-by: Dmitry Torokhov --- This can be applied independently. drivers/hid/hid-input.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index ecb1b6f26853..da76358cde06 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -677,6 +677,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel break; } + if ((usage->hid & 0xf0) == 0xb0) { /* SC - Display */ + switch (usage->hid & 0xf) { + case 0x05: map_key_clear(KEY_SWITCHVIDEOMODE); break; + default: goto ignore; + } + break; + } + /* * Some lazy vendors declare 255 usages for System Control, * leading to the creation of ABS_X|Y axis and too many others.