mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-04-08 22:35:18 -05:00
fix(pm): Fix deep sleep with sideband behaviors.
* Properly implement the PM hook needed for sideband behavior kscan device to have wakeup source enabled on it.
This commit is contained in:
committed by
Pete Johanson
parent
09111f1cf3
commit
4198fac90f
@@ -74,13 +74,14 @@ int zmk_kscan_init(const struct device *dev) {
|
||||
|
||||
k_work_init(&msg_processor.work, zmk_kscan_process_msgq);
|
||||
|
||||
kscan_config(dev, zmk_kscan_callback);
|
||||
kscan_enable_callback(dev);
|
||||
#if IS_ENABLED(CONFIG_PM_DEVICE)
|
||||
if (pm_device_wakeup_is_capable(dev)) {
|
||||
pm_device_wakeup_enable(dev, true);
|
||||
}
|
||||
#endif // IS_ENABLED(CONFIG_PM_DEVICE)
|
||||
|
||||
kscan_config(dev, zmk_kscan_callback);
|
||||
kscan_enable_callback(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user