From 5ee93929b99e0f9cffa2bb61ce379b6dcfe276e1 Mon Sep 17 00:00:00 2001 From: Daniel DeGrasse Date: Wed, 4 May 2022 16:55:03 -0500 Subject: [PATCH] drivers: memc: don't check pin control return code Some SOCs, such as the RT1064 and RT1024, use internal flash and don't define pinmux settings for the flexspi. Don't check the return code of pinctrl_apply_state, because the flexspi driver will fail to initialize when the pin mux settings are simply not required. Signed-off-by: Daniel DeGrasse --- drivers/memc/memc_mcux_flexspi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/memc/memc_mcux_flexspi.c b/drivers/memc/memc_mcux_flexspi.c index 1728092f8d8..86be3ff3aba 100644 --- a/drivers/memc/memc_mcux_flexspi.c +++ b/drivers/memc/memc_mcux_flexspi.c @@ -143,8 +143,11 @@ static int memc_flexspi_init(const struct device *dev) return 0; } - /* Apply pinctrl state */ -#ifdef CONFIG_PINCTRL + /* + * SOCs such as the RT1064 and RT1024 have internal flash, and no pinmux + * settings, so skip pin control state. + */ +#if defined(CONFIG_PINCTRL) && !(defined(CONFIG_SOC_MIMXRT1064) || defined(CONFIG_SOC_MIMXRT1024)) int ret; ret = pinctrl_apply_state(data->pincfg, PINCTRL_STATE_DEFAULT);