mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
refactor: Use kscan directly to wake when we can.
* When adding a dedicated GPIO pin for soft off/on, use the direct kscan as the waker, instead of adding an additional node.
This commit is contained in:
committed by
Pete Johanson
parent
2df6dcd973
commit
d0e0ecb4e3
@@ -42,24 +42,10 @@ encoder: &qdec0 {
|
||||
};
|
||||
};
|
||||
|
||||
wakeup_source: wakeup_source {
|
||||
compatible = "zmk,gpio-key-wakeup-trigger";
|
||||
status = "okay";
|
||||
|
||||
trigger = <&button0>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
soft_off_wakers {
|
||||
compatible = "zmk,soft-off-wakeup-sources";
|
||||
status = "okay";
|
||||
|
||||
wakeup-sources = <&wakeup_source>;
|
||||
};
|
||||
|
||||
soft_off_direct_kscan: soft_off_direct_kscan {
|
||||
compatible = "zmk,kscan-gpio-direct";
|
||||
input-keys = <&button0>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
soft_off_sideband_behaviors {
|
||||
@@ -72,4 +58,10 @@ encoder: &qdec0 {
|
||||
};
|
||||
};
|
||||
|
||||
soft_off_wakers {
|
||||
compatible = "zmk,soft-off-wakeup-sources";
|
||||
status = "okay";
|
||||
|
||||
wakeup-sources = <&soft_off_direct_kscan>;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user