X86 platform drivers
 help / color / mirror / Atom feed
From: "Luke D. Jones" <luke@ljones.dev>
To: platform-driver-x86@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, ilpo.jarvinen@linux.intel.com,
	hdegoede@redhat.com, corentin.chary@gmail.com,
	"Luke D. Jones" <luke@ljones.dev>
Subject: [PATCH v2 1/6] platform/x86: asus-wmi: Add quirk for ROG Ally X
Date: Tue,  6 Aug 2024 14:07:42 +1200	[thread overview]
Message-ID: <20240806020747.365042-2-luke@ljones.dev> (raw)
In-Reply-To: <20240806020747.365042-1-luke@ljones.dev>

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 <luke@ljones.dev>
---
 drivers/platform/x86/asus-wmi.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index f15fcb45e1aa..0c80c6b0399b 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -152,6 +152,20 @@ static const char * const ashs_ids[] = { "ATK4001", "ATK4002", NULL };
 
 static int throttle_thermal_policy_write(struct asus_wmi *);
 
+static const struct dmi_system_id asus_ally_mcu_quirk[] = {
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "RC71L"),
+		},
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "RC72L"),
+		},
+	},
+	{ },
+};
+
 static bool ashs_present(void)
 {
 	int i = 0;
@@ -4751,7 +4765,7 @@ static int asus_wmi_add(struct platform_device *pdev)
 	asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU);
 	asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE);
 	asus->ally_mcu_usb_switch = acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSEE)
-						&& dmi_match(DMI_BOARD_NAME, "RC71L");
+						&& dmi_check_system(asus_ally_mcu_quirk);
 
 	if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_MINI_LED_MODE))
 		asus->mini_led_dev_id = ASUS_WMI_DEVID_MINI_LED_MODE;
-- 
2.45.2


  reply	other threads:[~2024-08-06  2:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06  2:07 [PATCH v2 0/6] platform/x86: introduce asus-armoury Luke D. Jones
2024-08-06  2:07 ` Luke D. Jones [this message]
2024-08-06  7:28   ` [PATCH v2 1/6] platform/x86: asus-wmi: Add quirk for ROG Ally X Ilpo Järvinen
2024-08-06  2:07 ` [PATCH v2 2/6] platform/x86: asus-armoury: move existing tunings to asus-armoury module Luke D. Jones
2024-08-06 10:16   ` Ilpo Järvinen
2024-08-11  9:52     ` Luke Jones
2024-08-12  7:37       ` Ilpo Järvinen
2024-09-18  8:50         ` Luke Jones
2024-08-11 10:40     ` Luke Jones
2024-08-06  2:07 ` [PATCH v2 3/6] platform/x86: asus-armoury: add dgpu tgp control Luke D. Jones
2024-08-06 10:17   ` Ilpo Järvinen
2024-08-06  2:07 ` [PATCH v2 4/6] platform/x86: asus-armoury: add apu-mem control support Luke D. Jones
2024-08-06 10:20   ` Ilpo Järvinen
2024-08-11 10:05     ` Luke Jones
2024-08-12  7:39       ` Ilpo Järvinen
2024-08-06  2:07 ` [PATCH v2 5/6] platform/x86: asus-armoury: add core count control Luke D. Jones
2024-08-06 10:32   ` Ilpo Järvinen
2024-08-11 10:33     ` Luke Jones
2024-08-06  2:07 ` [PATCH v2 6/6] asus-wmi: deprecate bios features Luke D. Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240806020747.365042-2-luke@ljones.dev \
    --to=luke@ljones.dev \
    --cc=corentin.chary@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox