From patchwork Thu Jan 3 23:25:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10747853 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 4E75713B5 for ; Thu, 3 Jan 2019 23:26:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C24926247 for ; Thu, 3 Jan 2019 23:26:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 305AE260CD; Thu, 3 Jan 2019 23:26:04 +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=-7.9 required=2.0 tests=BAYES_00,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 A55E52580E for ; Thu, 3 Jan 2019 23:26:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726514AbfACX0D (ORCPT ); Thu, 3 Jan 2019 18:26:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48512 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbfACX0D (ORCPT ); Thu, 3 Jan 2019 18:26:03 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DCA369F722; Thu, 3 Jan 2019 23:26:02 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5ECED5D9C5; Thu, 3 Jan 2019 23:25:58 +0000 (UTC) From: Hans de Goede To: Dmitry Torokhov , Benjamin Tissoires Cc: Hans de Goede , linux-input@vger.kernel.org Subject: [PATCH 1/2] Input: soc_button_array - Add usage-page 0x01 usage-id 0xca mapping Date: Fri, 4 Jan 2019 00:25:55 +0100 Message-Id: <20190103232556.17965-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 03 Jan 2019 23:26:02 +0000 (UTC) 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 ACPI0011 _DSD button descriptor on a CHT based Intel Compute Sticks contains a mapping for usage-page 0x01 usage-id 0xca. As described in hutrr52_system_display_rotation_lock_controls_0.pdf this should be mapped as a "System Display Rotation Lock Slider Switch", this commit adds support for this, silencing the following warning: soc_button_array ACPI0011:00: Unknown button index 4 upage 01 usage ca, ignoring Signed-off-by: Hans de Goede --- drivers/input/misc/soc_button_array.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index 23520df7650f..f53923b1593b 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -185,6 +185,10 @@ static int soc_button_parse_btn_desc(struct device *dev, info->name = "power"; info->event_code = KEY_POWER; info->wakeup = true; + } else if (upage == 0x01 && usage == 0xca) { + info->name = "rotation lock switch"; + info->event_type = EV_SW; + info->event_code = SW_ROTATE_LOCK; } else if (upage == 0x07 && usage == 0xe3) { info->name = "home"; info->event_code = KEY_LEFTMETA;