From nobody Wed Dec 17 02:54:24 2025 Received: from fhigh1-smtp.messagingengine.com (fhigh1-smtp.messagingengine.com [103.168.172.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0D9913B7BC; Wed, 24 Jul 2024 22:29:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721860144; cv=none; b=uKq6ouXdMG82373vTUK6vFbdTuYcCwuKKG4PlvqeoNuOuSMS+I/H2VPqc4ZzOnDYjHsOBpuKzxDJsfc54yR9FtZ1fMQ6A2rVDUiJExZ7UGzo40W67Ud4iw/P/+B7K/6ww+hNGejhP27gmICkspL+eWZscU2me3c+V2ibbfwH5BI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721860144; c=relaxed/simple; bh=F06Gs9T8OWXm7tW344eZkX+dCY/ldQFGgyDn6fv3MZE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CAh+EDpVCN14NInjzcei4cfVWiqbqTWkw3NshNeRk2BvzI0gAwGzLbFhUpZLrdMAxOrqqlP/mxhHSitcw91tIFIr5lfk7h5Y+Y6/lXz39DlvrXu8ZsADk5qvSZI2RtoylBWoIlmKRAgbfJxW6KCJTG7FkGMeQ1iUnRtBJBnJwUY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ljones.dev; spf=none smtp.mailfrom=ljones.dev; dkim=pass (2048-bit key) header.d=ljones.dev header.i=@ljones.dev header.b=dZxZr51e; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Ty/KtDsX; arc=none smtp.client-ip=103.168.172.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ljones.dev Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ljones.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ljones.dev header.i=@ljones.dev header.b="dZxZr51e"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Ty/KtDsX" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id B85FB114009B; Wed, 24 Jul 2024 18:29:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 24 Jul 2024 18:29:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm1; t=1721860140; x=1721946540; bh=fP2milRMjQvGiHJdeSC30 UHVMk1tf84makXy+6bVKzY=; b=dZxZr51exoUlZT1ro2MbGyeM9SIvECgaFvWHZ YlBeXNEUsexzfLhgS0ZNQ7CBUj7CFpba+SxFrhY1zkwNGCFDigWNfbsdh3n+nO7S P9sk+LgSo9Qltbsi3e0xjenIj6b4vlfVZgP7kTzH6g7JPDHAeh9b7e/0WBW9+XM+ 2WQRG3p0a81M8ByGzo2MJ5j+s5HtOYzdxhLPOf9xLaZP+NlNoZxqY0erXhE7cNqu GhZzi6zW8ovgWOeG47dg5/NNbwOzL6gEhNVg/LvoISnFRZRBH6AZb57OhqHt7cU0 TxiBe4RWOYGX0E8KI9DrgT7g3XqOgXgChk1fMLhYd42lUn9uQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1721860140; x=1721946540; bh=fP2milRMjQvGiHJdeSC30UHVMk1t f84makXy+6bVKzY=; b=Ty/KtDsXwwH6CRB0KLO+uvo6yN/5EeOa6q9BcDHLyp8x NBEQXrgRtElOhIAH7JVuZP2ECIwZo8X7oUlFnAmwnoYo0XOWZjAv5lF8EaqgpQ4e SO/NDoauqCCwIa+E1g4+bbPDfNAiEHwLBaRsIbNKits4dgyVlR/Tj3mHlrkk6/nD OWSDDirnwOktJIJSu7CUqBQO9dCfWXsKoUUmjNLsCpQbgTkQoftqYVbqRk1Xy+kC BfIF4RKqvpNEA8jQCQtRXDC5QM1gis+Snl6TUokMvbGumfAC1PK2KpW5rQoZbTGg yn8yG3d3gyve0j/V9gCOUr870+mUUnUYDdEFbvk2zA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddriedvgdduudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgggfestdekredtre dttdenucfhrhhomhepfdfnuhhkvgcuffdrucflohhnvghsfdcuoehluhhkvgeslhhjohhn vghsrdguvghvqeenucggtffrrghtthgvrhhnpefgudejtdfhuddukefffeekiefftddtvd fhgeduudeuffeuhfefgfegfeetvedvgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehluhhkvgeslhhjohhnvghsrdguvghvpdhnsggprhgtph htthhopedt X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Jul 2024 18:28:57 -0400 (EDT) From: "Luke D. Jones" To: platform-driver-x86@vger.kernel.org Cc: corentin.chary@gmail.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org, "Luke D. Jones" Subject: [PATCH] platform/x86: asus-wmi: Add quirk for ROG Ally X Date: Thu, 25 Jul 2024 10:28:52 +1200 Message-ID: <20240724222852.44378-1-luke@ljones.dev> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The new ROG Ally X functions the same as the previus model so we can use the same method to ensure the MCU USB devices wake and reconnect correctly. Given that two devices marks the start of a trend, this patch also adds a quirk table to make future additions easier if the MCU is the same. Signed-off-by: Luke D. Jones --- drivers/platform/x86/asus-wmi.c | 2 +- include/linux/platform_data/x86/asus-wmi.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wm= i.c index 2b968003cb9b..bac2945b0e48 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -4694,7 +4694,7 @@ static int asus_wmi_add(struct platform_device *pdev) asus->dgpu_disable_available =3D asus_wmi_dev_is_present(asus, ASUS_WMI_D= EVID_DGPU); asus->kbd_rgb_state_available =3D asus_wmi_dev_is_present(asus, ASUS_WMI_= DEVID_TUF_RGB_STATE); asus->ally_mcu_usb_switch =3D acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSE= E) - && dmi_match(DMI_BOARD_NAME, "RC71L"); + && dmi_check_system(asus_ally_mcu_quirk); =20 if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_MINI_LED_MODE)) asus->mini_led_dev_id =3D ASUS_WMI_DEVID_MINI_LED_MODE; diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/pla= tform_data/x86/asus-wmi.h index 74b32e1d6735..fba9751cda5b 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -196,4 +196,19 @@ static const struct dmi_system_id asus_use_hid_led_dmi= _ids[] =3D { { }, }; =20 +/* To be used by both hid-asus and asus-wmi to determine which controls kb= d_brightness */ +static const struct dmi_system_id asus_ally_mcu_quirk[] =3D { + { + .matches =3D { + DMI_MATCH(DMI_BOARD_NAME, "RC71L"), + }, + }, + { + .matches =3D { + DMI_MATCH(DMI_BOARD_NAME, "RC72L"), + }, + }, + { }, +}; + #endif /* __PLATFORM_DATA_X86_ASUS_WMI_H */ --=20 2.45.2