From af908826cd750f666f41fc9bb0b0a148941956c2 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 1 May 2024 11:01:32 -0700 Subject: [PATCH] fix: Initialize sideband kscan in APPLICATION. * In order to be sure the rest of the system is fully ready before intializing, because init may result in immediate events being triggered when used with toggle direct kscan inner devices. --- app/src/kscan_sideband_behaviors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/kscan_sideband_behaviors.c b/app/src/kscan_sideband_behaviors.c index 7a9922af..f3992ebc 100644 --- a/app/src/kscan_sideband_behaviors.c +++ b/app/src/kscan_sideband_behaviors.c @@ -173,7 +173,7 @@ static int ksbb_pm_action(const struct device *dev, enum pm_device_action action struct ksbb_data ksbb_data_##n = {}; \ PM_DEVICE_DT_INST_DEFINE(n, ksbb_pm_action); \ DEVICE_DT_INST_DEFINE(n, ksbb_init, PM_DEVICE_DT_INST_GET(n), &ksbb_data_##n, \ - &ksbb_config_##n, POST_KERNEL, \ + &ksbb_config_##n, APPLICATION, \ CONFIG_ZMK_KSCAN_SIDEBAND_BEHAVIORS_INIT_PRIORITY, &ksbb_api); DT_INST_FOREACH_STATUS_OKAY(KSBB_INST)