Skip to content

Commit

Permalink
fix(kscan): Adjust composite kscan priority
Browse files Browse the repository at this point in the history
* Composite kscan needs a dedicated priority to be sure it is
  initialized after the other kscan instances.
  • Loading branch information
petejohanson committed Nov 13, 2023
1 parent 41cb58c commit c8d59fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/module/drivers/kscan/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ config ZMK_KSCAN_COMPOSITE_DRIVER
bool
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_COMPOSITE))

if ZMK_KSCAN_COMPOSITE_DRIVER

config ZMK_KSCAN_COMPOSITE_INIT_PRIORITY
int "Init Priority for the composite kscan driver"
default 95

endif

config ZMK_KSCAN_GPIO_DRIVER
bool
select GPIO
Expand Down
2 changes: 1 addition & 1 deletion app/module/drivers/kscan/kscan_composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ static const struct kscan_composite_config kscan_composite_config = {};
static struct kscan_composite_data kscan_composite_data;

DEVICE_DT_INST_DEFINE(0, kscan_composite_init, NULL, &kscan_composite_data, &kscan_composite_config,
POST_KERNEL, CONFIG_KSCAN_INIT_PRIORITY, &mock_driver_api);
POST_KERNEL, CONFIG_ZMK_KSCAN_COMPOSITE_INIT_PRIORITY, &mock_driver_api);

0 comments on commit c8d59fd

Please sign in to comment.