Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5564831rwb; Tue, 17 Jan 2023 15:50:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXsjCXja94mzFBqA9ivQ1GSDtDuyd8av9dhfPN5FLKEjeHd/vzEvUC90MHG01wYRiFn96sse X-Received: by 2002:a17:90a:7404:b0:229:7b2d:c13 with SMTP id a4-20020a17090a740400b002297b2d0c13mr5408323pjg.19.1673999407103; Tue, 17 Jan 2023 15:50:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673999407; cv=none; d=google.com; s=arc-20160816; b=vM4qi07wuUIEf2XSiJjpkAW17c1HowiExxmUdF1ZAV9jpUYzTe40bIYJv4+A8HuvYj oZ17SaoTfIg4aqJTKVWJjF2vX2rrVfuL/csi4WwjR9uurZNJsSn8f8JIbnhk9yJGHrF2 nAY6jcPJ6e07HoJis/CbpNEIW5pMChxJDPbvVNcypKd85kr0wQ2RtWPtuF85TbkCO5hm gt1qa0NAiS1eUy1RXD4gZswLdIA76A/FNj+LQW5vc2bLO4W1oM0TqcJ9WpSnUJDjccXN GWL74rMvMt7uMrZHfPmBDJ8yEyNXdOipuD6p2cFVLZrrxcngDryT39RO2P9WEESbnJFV HKYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date:dkim-signature; bh=33qaMlSpVSfTyxfYMwgop2tKVyisw8uFsAvqqsaRdvk=; b=pIUgUnLZeul1R7nDREXytk3EotcFAG/XXDYtXKo28X0eagBhCJJ4yEpzhnJn3Lp3YF 9r4SlteUAbepP2LDTRzs/cgAwYJ9ZwLPVUPK8JQ/+bzmSkfXp6y0ujc4u5B5VxbDtC5J hExohYVavuNMRPFW1F2jkDyhueF163qyMdIOHSl6QruKzfIDLBbfti6iFOdDrvvKyORf CafweKDkvawt8XDsBCgiaeHTKY5B8sPYIasDChZZdm5+NZf88AGmeFEOpB/RWjR1WKGZ HmfuP/R52GA6MYKMyZxaZiI6vz4oLnvP+wo/KpVG88McN7KLiEsB7PemeNZZB+gG5400 KegA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jnOaaN1Z; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6-20020a17090aa00600b002191a044fadsi269559pjp.122.2023.01.17.15.50.01; Tue, 17 Jan 2023 15:50:07 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=jnOaaN1Z; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230007AbjAQW7h (ORCPT + 46 others); Tue, 17 Jan 2023 17:59:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbjAQW6y (ORCPT ); Tue, 17 Jan 2023 17:58:54 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C77C525E0A; Tue, 17 Jan 2023 14:39:03 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id z4-20020a17090a170400b00226d331390cso340065pjd.5; Tue, 17 Jan 2023 14:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=33qaMlSpVSfTyxfYMwgop2tKVyisw8uFsAvqqsaRdvk=; b=jnOaaN1ZJ+jI7rtdQVFeKIHLA5Bgl2QnrWRIpza+vVWBjGF9zqdyX2J97Ow4idXBKz PZCpKVssc/3kDibdFs2pni6XMth3G4DUPkJOHUv2PbuEEv2UYaqZSpZBGH4qddsEIue2 3+C7p0ekGh7SZpJJzX9nFkTSuoVMkOqJkM5rLEV7DYFQCwm+eI0fECelUJUV5gCogcgu FLc136xOAxeDnxwY9UXbg1WyGGyGbC+cKBgMpXKvfGCNNNvU/n50NOzrtnhrXRJnpWPj F5OdBhdCZchMmNtBhTITsGauyIJkR6oLuQ0c6FOZ1E4e7B6mfcFzydestYXKpKvAF3S8 QTiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=33qaMlSpVSfTyxfYMwgop2tKVyisw8uFsAvqqsaRdvk=; b=4/AwKoxdg8WPFzrc4knV+Q3Mv4iM9tL2OXLGJynqMlkvvC22gjkuIy+GN8mmaoyfzI Ksb+Ycw9VQ3H5qFpwJ9jcUMJiRXwpoO2Me5PZorFsnQsNtfanNVEPyYjTT+c0vczxvwr tFzIlgewCIEOQ9JBufzReyDR0aR2jqCKTFVOGxA//iCt0w0j3Ug7yagSMmavUCbj0eNA 7eyJkWYaTXJdXLNkawR64YzmRdqOcXF6WMAlUWsV8YoaV9RYmqq12w3Z5QekhaO99/2g It/Gv7WrX3cSRVl3wF4ieyKW5ucSjgo7R0dvyePBcFptU2gqNyEpuwi/IKrzB43tlp6b eiLw== X-Gm-Message-State: AFqh2kre4rIsWBGjTvxYjXypGyC+QSxXn8TtQ36x9Y9qnbu/jY2InAuZ 1upeSksMcR3RPol4ymzb5VUtJiAQ0ylf+NAZ X-Received: by 2002:a17:902:e810:b0:189:e577:c83d with SMTP id u16-20020a170902e81000b00189e577c83dmr6582470plg.66.1673995142869; Tue, 17 Jan 2023 14:39:02 -0800 (PST) Received: from rishit-OMEN-Laptop-15-en0xxx ([171.76.81.196]) by smtp.gmail.com with ESMTPSA id ix15-20020a170902f80f00b00192b23b8451sm21774791plb.108.2023.01.17.14.39.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 14:39:02 -0800 (PST) Date: Wed, 18 Jan 2023 04:08:58 +0530 From: Rishit Bansal To: Hans de Goede , Mark Gross , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] platform/x86: hp-wmi: Handle Omen Key event Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Add support to map the "HP Omen Key" to KEY_PROG2. Laptops in the HP Omen Series open the HP Omen Command Center application on windows. But, on linux it fails with the following message from the hp-wmi driver: [ 5143.415714] hp_wmi: Unknown event_id - 29 - 0x21a5 Signed-off-by: Rishit Bansal --- drivers/platform/x86/hp/hp-wmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c index 0a99058be813..d8ba3c483901 100644 --- a/drivers/platform/x86/hp/hp-wmi.c +++ b/drivers/platform/x86/hp/hp-wmi.c @@ -91,6 +91,7 @@ enum hp_wmi_event_ids { HPWMI_BATTERY_CHARGE_PERIOD = 0x10, HPWMI_SANITIZATION_MODE = 0x17, HPWMI_SMART_EXPERIENCE_APP = 0x21, + HPWMI_OMEN_KEY = 0x1D, }; /* @@ -219,6 +220,7 @@ static const struct key_entry hp_wmi_keymap[] = { { KE_KEY, 0x21a9, { KEY_TOUCHPAD_OFF } }, { KE_KEY, 0x121a9, { KEY_TOUCHPAD_ON } }, { KE_KEY, 0x231b, { KEY_HELP } }, + { KE_KEY, 0x21a5, { KEY_PROG2 }}, /* HP Omen Key */ { KE_END, 0 } }; @@ -810,6 +812,7 @@ static void hp_wmi_notify(u32 value, void *context) case HPWMI_SMART_ADAPTER: break; case HPWMI_BEZEL_BUTTON: + case HPWMI_OMEN_KEY: key_code = hp_wmi_read_int(HPWMI_HOTKEY_QUERY); if (key_code < 0) break; -- 2.37.2