From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3056C001DB for ; Sun, 13 Aug 2023 16:09:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232645AbjHMQJ0 (ORCPT ); Sun, 13 Aug 2023 12:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232578AbjHMQI4 (ORCPT ); Sun, 13 Aug 2023 12:08:56 -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 22BBE1FDD; Sun, 13 Aug 2023 09:08:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 026F863936; Sun, 13 Aug 2023 16:08:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5F3EC433C8; Sun, 13 Aug 2023 16:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691942918; bh=EZH+HjeeZ/nJQPoaOiZPN0WGb8kdKDFWGxJVoTpq/uU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PX4oVmtd/+B4Ulun+tpFc693O/TZQIuLiVJU4EyO0JoNNhdjeSwsm9WO3ihyh7XSr kDkLTATkUfBC8sPSmv82ATuPvi1B9xMrX3qFHk89jFDeEQoJN6Lyb3hWdMlX8ij7X4 d039GzOMQTfoMvvjvXbUbjoPCPhaXwkM8bnJkL56Jk5ee1umH7cX7jBNN3HkPVpakJ HdNXnveYcc9665OPHkBLc7R5LIRFxaSH7BYypLRcXiUmZZF1/fzDM2VQWAbgAlJF0a P11T8pYOsnWEcYh4v39AhmKmhVu98TMVFbjv0uEiXaR8LSVqVA0LDQEwfkcE1nlX77 fSlwPg2caQTlw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Maxim Mikityanskiy , Hans de Goede , Sasha Levin , alexhung@gmail.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 23/31] platform/x86/intel/hid: Add HP Dragonfly G2 to VGBS DMI quirks Date: Sun, 13 Aug 2023 12:05:56 -0400 Message-Id: <20230813160605.1080385-23-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230813160605.1080385-1-sashal@kernel.org> References: <20230813160605.1080385-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.15.126 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxim Mikityanskiy [ Upstream commit 7783e97f8558ad7a4d1748922461bc88483fbcdf ] HP Elite Dragonfly G2 (a convertible laptop/tablet) has a reliable VGBS method. If VGBS is not called on boot, the firmware sends an initial 0xcd event shortly after calling the BTNL method, but only if the device is booted in the laptop mode. However, if the device is booted in the tablet mode and VGBS is not called, there is no initial 0xcc event, and the input device for SW_TABLET_MODE is not registered up until the user turns the device into the laptop mode. Call VGBS on boot on this device to get the initial state of SW_TABLET_MODE in a reliable way. Tested with BIOS 1.13.1. Signed-off-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20230716183213.64173-1-maxtram95@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sasha Levin --- drivers/platform/x86/intel/hid.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c index 73ecbdfcfb7c0..f59a3cc9767b9 100644 --- a/drivers/platform/x86/intel/hid.c +++ b/drivers/platform/x86/intel/hid.c @@ -138,6 +138,12 @@ static const struct dmi_system_id dmi_vgbs_allow_list[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go"), }, }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Elite Dragonfly G2 Notebook PC"), + }, + }, { } }; -- 2.40.1