Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1971734rwn; Fri, 16 Sep 2022 03:54:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6rLueVfuvNT1LN4QrAQLsIFVa9/LH8hNxSwykJSt9cd9WfXDRRvjdL/sRqmtGuEK5GwL3u X-Received: by 2002:a17:907:6e24:b0:780:3340:48b8 with SMTP id sd36-20020a1709076e2400b00780334048b8mr3067760ejc.303.1663325657913; Fri, 16 Sep 2022 03:54:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663325657; cv=none; d=google.com; s=arc-20160816; b=bOQC7/dl8Po3layouvfTmKCUXrOix//z+GGhvNgDvoXNgkGXkBjUoqWEGDrFkheMTQ ZR3SLbhxrj7fyrGnTXiru8clNlaBIcb0CVLDGuZyK6I0GkV2OzdVIjedzY4RdSj8TL5M MSwbFKSAaRuRS/IC463YawXEsAC5gRoKAm0hnoimOhBnEhAtj+1Tg+ZOU8LSsj1Q8iY5 Gath2PX+l3SX2Yl5/9k5ZpMREhBMWHpPgEqsymfuuah3yBaMAPgNnHHpu/6Zm/0JNbDT W9luGRXCjwsmh/0/2wesGwzg7s9iHfD4w2iTodf5ygSu4fb7o53hRV3sIgtOhigV7183 vW4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l241xuNN8Tx2v8VzM2ZVVzLraFXfAWAHrJCZ3EIth8I=; b=udJhh5COUJ62Z5MsYTt+SRO9dtOZhPBIcGqRN6Dx1DsTr4rv8ea422blZpVA8GSO+i qCG+PXb0QL1Nx5uwCNdgeYRN7rJwi8HYv9Vor8ST0N99qFxiLhySssUwkqYFAe6pr40V qwL2q6VsKx5rCqxw2mSi/BGB2VuRf/VgroFx5D0HVgDWXteaZbdV9gsyUC4ayNEqa6Xe iiHZqzDGdwkYyogaLp0O3+G0Xy35HOCAHFHwlTloaAkcwqiu+kLm6gJ+4wDuoI7H1Nen z82Kr5/okLhcEoq55FmKwognwV0ZWuPpFDdTJ7Ve7vxrC8eK5G7+jpnYxEVzAWWeLvl8 TMQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mkpAtnyp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a1709064fc300b0072a477a55e0si15603638ejw.369.2022.09.16.03.53.53; Fri, 16 Sep 2022 03:54:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mkpAtnyp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230496AbiIPKLI (ORCPT + 99 others); Fri, 16 Sep 2022 06:11:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbiIPKKD (ORCPT ); Fri, 16 Sep 2022 06:10:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 035E9AB4C6; Fri, 16 Sep 2022 03:08:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3C8D0629EF; Fri, 16 Sep 2022 10:08:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D01CC433D6; Fri, 16 Sep 2022 10:08:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663322927; bh=D2rE29kt5MM56pb8ylcl+pzYAkXIdtG9oKFfn8Yw93c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mkpAtnyp834A46MY/s7B4k5Pb1KpjeBjg2Xcfmfpj4AWwfu+XOE/DAMwzpLWbao9U CczbpNo0Y6tn74EuI4T1Pwgu+gFIm0KjXw0fhNH096DBwnkw3kcnUvZIjYmXxf2i4M K204g6sCH3nDxxNUrS9J1vhY4H65UwrfLtlFlOSs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Sasha Levin Subject: [PATCH 4.19 07/11] platform/x86: acer-wmi: Acer Aspire One AOD270/Packard Bell Dot keymap fixes Date: Fri, 16 Sep 2022 12:08:03 +0200 Message-Id: <20220916100443.022377104@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220916100442.662955946@linuxfoundation.org> References: <20220916100442.662955946@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit c3b82d26bc85f5fc2fef5ec8cce17c89633a55a8 ] 2 keymap fixes for the Acer Aspire One AOD270 and the same hardware rebranded as Packard Bell Dot SC: 1. The F2 key is marked with a big '?' symbol on the Packard Bell Dot SC, this sends WMID_HOTKEY_EVENTs with a scancode of 0x27 add a mapping for this. 2. Scancode 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate input event with the "Video Bus" input device events. But on these devices the "Video Bus" does not send events for this key. Map 0x61 to KEY_UNKNOWN instead of using KE_IGNORE so that udev/hwdb can override it on these devs. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220829163544.5288-1-hdegoede@redhat.com Signed-off-by: Sasha Levin --- drivers/platform/x86/acer-wmi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index bd25c8a156d24..c73ce07b66c9a 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -106,6 +106,7 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { {KE_KEY, 0x22, {KEY_PROG2} }, /* Arcade */ {KE_KEY, 0x23, {KEY_PROG3} }, /* P_Key */ {KE_KEY, 0x24, {KEY_PROG4} }, /* Social networking_Key */ + {KE_KEY, 0x27, {KEY_HELP} }, {KE_KEY, 0x29, {KEY_PROG3} }, /* P_Key for TM8372 */ {KE_IGNORE, 0x41, {KEY_MUTE} }, {KE_IGNORE, 0x42, {KEY_PREVIOUSSONG} }, @@ -119,7 +120,13 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { {KE_IGNORE, 0x48, {KEY_VOLUMEUP} }, {KE_IGNORE, 0x49, {KEY_VOLUMEDOWN} }, {KE_IGNORE, 0x4a, {KEY_VOLUMEDOWN} }, - {KE_IGNORE, 0x61, {KEY_SWITCHVIDEOMODE} }, + /* + * 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate input event + * with the "Video Bus" input device events. But sometimes it is not + * a dup. Map it to KEY_UNKNOWN instead of using KE_IGNORE so that + * udev/hwdb can override it on systems where it is not a dup. + */ + {KE_KEY, 0x61, {KEY_UNKNOWN} }, {KE_IGNORE, 0x62, {KEY_BRIGHTNESSUP} }, {KE_IGNORE, 0x63, {KEY_BRIGHTNESSDOWN} }, {KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} }, /* Display Switch */ -- 2.35.1