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 B3880C04A94 for ; Sun, 13 Aug 2023 16:05:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232508AbjHMQFW (ORCPT ); Sun, 13 Aug 2023 12:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232511AbjHMQEz (ORCPT ); Sun, 13 Aug 2023 12:04:55 -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 B5D3719B9; Sun, 13 Aug 2023 09:04:40 -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 042A663607; Sun, 13 Aug 2023 16:03:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62026C433C7; Sun, 13 Aug 2023 16:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691942593; bh=DE3xchYQ1DeF+BA8X8plPuGdl7Ffut3alLrhla818+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aG5WO8Q+NWzQYsiruhAh6T1RCvNAr/KeHv3jQrx/CKOyDjVAN18dpnW2qCS8/Qzku oPBWsFbviHj6xGKCheuTY+2T51buvyimDkGPO36edrvezFVq+viMtCuxg/zgJxN3gN +6e/RLjSJ++YYonon1sB33l1QdGhsdRH7QqldlcAIl3F3gNa+W1zjUpWj1XigJ7WGH bnr8Lme/Kw5OXl+l+VBsbivMjRkhKrf4/WwL8+Mprl+k6JxZRmU/ylMMCfwz7X8Xcm W6SH3Go/fMArvtitjRpM7JXufYG3TgZgfsCpViNnKwugA3ysnMKTeRZxw5ZpMenWZ5 eO6eO8L0GL/Lw== 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 6.1 33/47] platform/x86/intel/hid: Add HP Dragonfly G2 to VGBS DMI quirks Date: Sun, 13 Aug 2023 11:59:28 -0400 Message-Id: <20230813160006.1073695-33-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230813160006.1073695-1-sashal@kernel.org> References: <20230813160006.1073695-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.45 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 df533b277b999..b96ef0eb82aff 100644 --- a/drivers/platform/x86/intel/hid.c +++ b/drivers/platform/x86/intel/hid.c @@ -131,6 +131,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