From 0295edf8346c5a35b117a12a47807628188390e6 Mon Sep 17 00:00:00 2001 From: Ederson de Souza Date: Thu, 3 Aug 2023 15:59:50 -0700 Subject: [PATCH] soc/arm/microchip_mec/mec1501: Initialise GPIO after interrupts Since bb590b5b6e2e, which enforces a more consistent ordering of initialisation for devices, the SOC initialisation was happening after GPIO initialisation. This caused interrupts to stop working on GPIO input. This patch fixes that by increasing the default GPIO initialisation priority, so that it happens after SOC. Signed-off-by: Ederson de Souza --- soc/arm/microchip_mec/mec1501/Kconfig.soc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/soc/arm/microchip_mec/mec1501/Kconfig.soc b/soc/arm/microchip_mec/mec1501/Kconfig.soc index 2fc22833ff8..51db7329f98 100644 --- a/soc/arm/microchip_mec/mec1501/Kconfig.soc +++ b/soc/arm/microchip_mec/mec1501/Kconfig.soc @@ -85,3 +85,13 @@ choice JTAG port in SWD mode and SWV as tracing method. UART2 cannot be used. ADC00-03 can be used. endchoice + +# GPIO initialization depends on SOC initialization, which happen at +# CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, so GPIO_INIT_PRIORITY needs to be +# higher than that. +if GPIO + +config GPIO_INIT_PRIORITY + default 41 + +endif # GPIO