Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3698705imu; Fri, 18 Jan 2019 15:32:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN7zeKY2kxCRqrvpPNLKNvqruVw6sKIYOyDx6N7VeHHa91Cd+OH9S5u6pczDcyw6g/yeNwK6 X-Received: by 2002:a63:6506:: with SMTP id z6mr19686418pgb.334.1547854346798; Fri, 18 Jan 2019 15:32:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547854346; cv=none; d=google.com; s=arc-20160816; b=iyEyXzOF5MLVSIVNkWzE++31A9MFccPDYwNAgMDgJMmpf6QkYwqFbq+OTnY64u8omq HHdPuNwqFcd6ZfVDD0rJVeEEY62bn/oFq6yMHoH96wLpkOWd6PctB4VnLcTD0yGpuWdu T363SNYZI0RDIlGosSTeWiRNSSh6sMw+73+4cGQ9s8fKJ9YoyRiknxbDhBeD/DuuT4vT dN1oTSJ2mpgjTZHqRJOnlriO/EhpQsL7TW3ztGfg33VdGIq2wKEQ5IdDpkgvx/YR7CA6 3CAVEU0Bu8BMZexoIPxm3RFr4FXVY65yOUlLi3TncS0foBK2HHzBFUnia9ikRqzC1cZW Vc8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XXL4qZP7YbRvfTyx9AD04ZGmWvKykJHmkbQQ6OFvsZo=; b=oUhYf2YI+N8ruJjQ3kLdwAj9bjGc7Y3HoFosV/+q2zTc/ArbohHwpE75Xg/hmsb+K2 KZuafv5uUNgxAk31wogSxM5W8d6yLKN68u0H9BV76i2J3QCpFWKmGYp+hx9vxUJbPuCQ FbHRMA39DdXKQiox9P0G6BtWM206luFdHnQTfIZ+TFoZ82b9znVtT5Lmjm5+i2om45uQ hGqfANwTN/3bAv87zZQd8WY88I3zAUOf33CAsvlUDk+LBWfEIol91k8PknVgJx275LOy qXxqUE2RE7WOUYUSWFmX7gwu+XF1PLsuywZlqCfJb9f9jxp8Tl/yLG86j8mC3Qs5F4Ks 03QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fHg4W+Tr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d39si5553616pla.278.2019.01.18.15.32.08; Fri, 18 Jan 2019 15:32:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fHg4W+Tr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730227AbfARXat (ORCPT + 99 others); Fri, 18 Jan 2019 18:30:49 -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-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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- 2.20.1.321.g9e740568ce-goog