summaryrefslogtreecommitdiff
path: root/include/linux/platform_data/x86
diff options
context:
space:
mode:
authorLuke D. Jones <luke@ljones.dev>2023-11-27 12:05:21 +1300
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-11-28 15:19:53 +0200
commite0894ff038d86f30614ec16ec26dacb88c8d2bd4 (patch)
tree2f779f6807efc5fc4ace1b7088334d88c678d4e3 /include/linux/platform_data/x86
parentfb103b90e944ecd664577c0fd37a069282dcd294 (diff)
platform/x86: asus-wmi: disable USB0 hub on ROG Ally before suspend
ASUS have worked around an issue in XInput where it doesn't support USB selective suspend, which causes suspend issues in Windows. They worked around this by adjusting the MCU firmware to disable the USB0 hub when the screen is switched off during the Microsoft DSM suspend path in ACPI. The issue we have with this however is one of timing - the call the tells the MCU to this isn't able to complete before suspend is done so we call this in a prepare() and add a small msleep() to ensure it is done. This must be done before the screen is switched off to prevent a variety of possible races. Further to this the MCU powersave option must also be disabled as it can cause a number of issues such as: - unreliable resume connection of N-Key - complete loss of N-Key if the power is plugged in while suspended Disabling the powersave option prevents this. Without this the MCU is unable to initialise itself correctly on resume. Signed-off-by: "Luke D. Jones" <luke@ljones.dev> Tested-by: Philip Mueller <philm@manjaro.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20231126230521.125708-2-luke@ljones.dev Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'include/linux/platform_data/x86')
-rw-r--r--include/linux/platform_data/x86/asus-wmi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h
index 63e630276499..ab1c7deff118 100644
--- a/include/linux/platform_data/x86/asus-wmi.h
+++ b/include/linux/platform_data/x86/asus-wmi.h
@@ -114,6 +114,9 @@
/* Charging mode - 1=Barrel, 2=USB */
#define ASUS_WMI_DEVID_CHARGE_MODE 0x0012006C
+/* MCU powersave mode */
+#define ASUS_WMI_DEVID_MCU_POWERSAVE 0x001200E2
+
/* epu is connected? 1 == true */
#define ASUS_WMI_DEVID_EGPU_CONNECTED 0x00090018
/* egpu on/off */