Browse Source

fix(behaviors): Missed refactor for PM callback.

xmkb
Peter Johanson 3 years ago
parent
commit
af4753cae1
  1. 2
      app/src/behaviors/behavior_backlight.c
  2. 7
      app/src/behaviors/behavior_key_repeat.c
  3. 4
      app/src/behaviors/behavior_macro.c
  4. 6
      app/src/behaviors/behavior_tap_dance.c

2
app/src/behaviors/behavior_backlight.c

@ -91,7 +91,7 @@ static const struct behavior_driver_api behavior_backlight_driver_api = {
.locality = BEHAVIOR_LOCALITY_GLOBAL, .locality = BEHAVIOR_LOCALITY_GLOBAL,
}; };
DEVICE_DT_INST_DEFINE(0, behavior_backlight_init, device_pm_control_nop, NULL, NULL, APPLICATION, DEVICE_DT_INST_DEFINE(0, behavior_backlight_init, NULL, NULL, NULL, APPLICATION,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_backlight_driver_api); CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_backlight_driver_api);
#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */

7
app/src/behaviors/behavior_key_repeat.c

@ -116,10 +116,9 @@ static int behavior_key_repeat_init(const struct device *dev) {
.usage_pages = DT_INST_PROP(n, usage_pages), \ .usage_pages = DT_INST_PROP(n, usage_pages), \
.usage_pages_count = DT_INST_PROP_LEN(n, usage_pages), \ .usage_pages_count = DT_INST_PROP_LEN(n, usage_pages), \
}; \ }; \
DEVICE_DT_INST_DEFINE(n, behavior_key_repeat_init, device_pm_control_nop, \ DEVICE_DT_INST_DEFINE(n, behavior_key_repeat_init, NULL, &behavior_key_repeat_data_##n, \
&behavior_key_repeat_data_##n, &behavior_key_repeat_config_##n, \ &behavior_key_repeat_config_##n, APPLICATION, \
APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_repeat_driver_api);
&behavior_key_repeat_driver_api);
DT_INST_FOREACH_STATUS_OKAY(KR_INST) DT_INST_FOREACH_STATUS_OKAY(KR_INST)

4
app/src/behaviors/behavior_macro.c

@ -178,8 +178,8 @@ static const struct behavior_driver_api behavior_macro_driver_api = {
.default_tap_ms = DT_INST_PROP_OR(n, tap_ms, 100), \ .default_tap_ms = DT_INST_PROP_OR(n, tap_ms, 100), \
.count = DT_INST_PROP_LEN(n, bindings), \ .count = DT_INST_PROP_LEN(n, bindings), \
.bindings = TRANSFORMED_BEHAVIORS(n)}; \ .bindings = TRANSFORMED_BEHAVIORS(n)}; \
DEVICE_DT_INST_DEFINE(n, behavior_macro_init, device_pm_control_nop, \ DEVICE_DT_INST_DEFINE(n, behavior_macro_init, NULL, &behavior_macro_state_##n, \
&behavior_macro_state_##n, &behavior_macro_config_##n, APPLICATION, \ &behavior_macro_config_##n, APPLICATION, \
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_macro_driver_api); CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_macro_driver_api);
DT_INST_FOREACH_STATUS_OKAY(MACRO_INST) DT_INST_FOREACH_STATUS_OKAY(MACRO_INST)

6
app/src/behaviors/behavior_tap_dance.c

@ -250,9 +250,9 @@ static int behavior_tap_dance_init(const struct device *dev) {
.tapping_term_ms = DT_INST_PROP(n, tapping_term_ms), \ .tapping_term_ms = DT_INST_PROP(n, tapping_term_ms), \
.behaviors = behavior_tap_dance_config_##n##_bindings, \ .behaviors = behavior_tap_dance_config_##n##_bindings, \
.behavior_count = DT_INST_PROP_LEN(n, bindings)}; \ .behavior_count = DT_INST_PROP_LEN(n, bindings)}; \
DEVICE_DT_INST_DEFINE(n, behavior_tap_dance_init, device_pm_control_nop, NULL, \ DEVICE_DT_INST_DEFINE(n, behavior_tap_dance_init, NULL, NULL, &behavior_tap_dance_config_##n, \
&behavior_tap_dance_config_##n, APPLICATION, \ APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_tap_dance_driver_api); &behavior_tap_dance_driver_api);
DT_INST_FOREACH_STATUS_OKAY(KP_INST) DT_INST_FOREACH_STATUS_OKAY(KP_INST)

Loading…
Cancel
Save