History

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.

Luke D. Jones committed 2 years ago

Commit e0894ff1 parent fb103b92 files · +53 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/platform_data/x86/asus-wmi.h+3−0
@@ -114,6 +114,9 @@ · 113 unmodified lines
114114 /* Charging mode - 1=Barrel, 2=USB */
115115 #define ASUS_WMI_DEVID_CHARGE_MODE 0x0012006C
116116
117+/* MCU powersave mode */
118+#define ASUS_WMI_DEVID_MCU_POWERSAVE 0x001200E2
119+
117120 /* epu is connected? 1 == true */
118121 #define ASUS_WMI_DEVID_EGPU_CONNECTED 0x00090018
119122 /* egpu on/off */