Commit Graph

5 Commits

Author SHA1 Message Date
Kieran Levin
385ed1a291 fix selective suspend on RP2040
the tmk_core chibios protocol_pre_task does not
process any usb events when the host is in suspend.

I think there is a race condition where the usb_event_queue_task
will not be processed depending on when usb goes to sleep.
so we may fall into the
while (USB_DRIVER.state == USB_SUSPENDED) {
which comes directly from the hardware interrupt.
and never process pending events in
usb_event_queue_task();

Signed-off-by: Kieran Levin <ktl@frame.work>
2023-11-17 19:04:24 +08:00
Stefan Kerkmann
a87c74ebe1
[Bug] Fix non-functional S3 wakeup / resume from suspense (#19780)
* Update ChibiOS-Contrib for USB suspend fixes

* Remove S3 wakup workaround

ChibiOS OTGv1 driver has a remote wakeup bug that prevents the device to
resume it's operation. 02516cbc24647f522eee975e69cc0c8a925470eb 
introduced a hotfix that forcefully restarted the usb driver as a workaround. 
This workaround broke multiple boards which do not use this driver / 
peripheral. With the update of ChibiOS this hotfix is now obsolete.

* Remove restart_usb_driver overrides

they are no longer necessary as the workaround is not needed anymore
for stm32f4

* Remove unused RP_USB_USE_SOF_INTR defines

The SOF interrupt is enabled dynamically by the RP2040 usb driver
2023-06-26 23:55:52 +02:00
Joel Challis
135c935990
Initial migration of suspend callbacks (#16067)
* Initial migration of suspend logic

* Add header
2022-02-05 05:10:00 +11:00
Joel Challis
6a9ec74b32
Remove unused suspend_idle (#16063) 2022-01-26 14:57:28 -08:00
Joel Challis
2728603fe6
Move tmk_core/common/<plat> (#13918) 2021-11-19 10:41:02 -08:00