zmkfirmware / zmk

ZMK Firmware Repository
https://zmk.dev/
MIT License
2.83k stars 2.85k forks source link

kscan-composite not waking up device from deep sleep. #2654

Open svek1 opened 1 week ago

svek1 commented 1 week ago

I'm using the kscan-composite driver to merge a kscan-gpio-matrix and kscan-gpio-direct driver, due to the way some keys are wired on my board. Both drivers have the wakeup-source property configured in my device tree overlay. When the board goes to sleep, pressing one of the keys does not wake it up. If I change my chosen kscan to the kscan-gpio-matrix or kscan-gpio-direct driver, wakeup works as expected.

I'm not experienced with Zephyr or ZMK, but as far as I can see the kscan-composite.c driver just handles the kscan events from its children and turns them on / off if requested. Maybe the issue is that wakeup events from the children drivers don't get passed along? Or the children get disabled even though they shouldn't be, when the board goes into deep sleep?

Maybe someone can point me in the right direction.

svek1 commented 1 day ago

Related PR https://github.com/zmkfirmware/zmk/pull/2673