platform/x86: asus-wmi: ROG Ally increase wait time, allow MCU powersave
authorLuke D. Jones <luke@ljones.dev>
Thu, 4 Apr 2024 00:16:50 +0000 (13:16 +1300)
committerHans de Goede <hdegoede@redhat.com>
Mon, 8 Apr 2024 16:30:27 +0000 (18:30 +0200)
commit7e7a5dee49732ed01a3a17c9a3edf027fb9457fe
treea45ae824b4ed1a5b5bcfddb16391fde8f70e7a20
parent892fc4b57dc576326a25b55833ae63d1310f113d
platform/x86: asus-wmi: ROG Ally increase wait time, allow MCU powersave

The previous work to allow the MCU to be resumed correctly after sleep
and resume tried to take the shortest possible time. However as work
continues in various other parts of the s2idle subsystems it has shown
that it wasn't entirely reliable.

If the MCU disable/enable call is done correctly the MCU fully removes
its USB endpoints, and this shows as a full USB device reconnection on
resume. When we tried to short this as much as possible sometimes the
MCU doesn't get to complete what it needs to do before going to low-power
and this affected the reconnection.

Through trial it is found that the minimum time required is approx 1200ms
to allow a proper disconnect and disable, and the same amount of time on
resume is required to prevent a rapid disconnect/reconnect happening on
seemingly random occasions. To be safe the time is now 1500ms for msleep.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20240404001652.86207-8-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/asus-wmi.c