From 4cf5d5cf8b84221310677706441b9324d04521d7 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Wed, 13 Sep 2023 15:07:18 +0200 Subject: [PATCH] drivers: misc: ft8xx: move to POST_KERNEL level There's no need to use APPLICATION level. Also create a custom init level that runs late in the process (depends e.g. on SPI which runs at high priority level, 70). Signed-off-by: Gerard Marull-Paretas --- drivers/misc/ft8xx/Kconfig | 7 +++++++ drivers/misc/ft8xx/ft8xx.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/misc/ft8xx/Kconfig b/drivers/misc/ft8xx/Kconfig index 6cc3773e662..1123c188c12 100644 --- a/drivers/misc/ft8xx/Kconfig +++ b/drivers/misc/ft8xx/Kconfig @@ -10,3 +10,10 @@ config FT800 select SPI help Enable driver for FT800 controller. + +config FT800_INIT_PRIORITY + int "FT800 init priority" + default 90 + depends on FT800 + help + FT800 driver initialization priority in POST_KERNEL. diff --git a/drivers/misc/ft8xx/ft8xx.c b/drivers/misc/ft8xx/ft8xx.c index 9b71dd3c92a..1dcbe581b13 100644 --- a/drivers/misc/ft8xx/ft8xx.c +++ b/drivers/misc/ft8xx/ft8xx.c @@ -168,7 +168,7 @@ static int ft8xx_init(const struct device *dev) } DEVICE_DT_INST_DEFINE(0, ft8xx_init, NULL, &ft8xx_data, &ft8xx_config, - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, NULL); + POST_KERNEL, CONFIG_FT800_INIT_PRIORITY, NULL); int ft8xx_get_touch_tag(void) {