diff mbox series

[v2,2/3] pinctrl: freescale: Use CONFIG_SOC_IMXRT to guard i.MX RT1xxx drivers

Message ID 20240506-imx-pinctrl-optional-v2-2-bdff75085156@geanix.com (mailing list archive)
State New, archived
Headers show
Series ARM: imx: only enable pinctrl as needed | expand

Commit Message

Esben Haabendal May 6, 2024, 10:23 a.m. UTC
This aligns with the use of SOC_IMX* as dependencies for all the other
mach-imx pinctrl drivers. Enabling i.MX RT pinctrl drivers for a kernel
with out i.MX RT SOC support is pointless.

Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 drivers/pinctrl/freescale/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Arnd Bergmann May 6, 2024, 11:29 a.m. UTC | #1
On Mon, May 6, 2024, at 12:23, Esben Haabendal wrote:
> 
>  config PINCTRL_IMXRT1050
>  	bool "IMXRT1050 pinctrl driver"
> -	depends on ARCH_MXC
> +	depends on SOC_IMXRT
> +	default SOC_IMXRT
>  	select PINCTRL_IMX
>  	help
>  	  Say Y here to enable the imxrt1050 pinctrl driver

Maybe make this

       depends on SOC_IMXRT || COMPILE_TEST

I see that all the i.MX pinctrl drivers are currently missing
this, but a lot of other platforms have the ||COMPILE_TEST 
bit so it gets included in x86 allmodconfig tests that
often gets run before sending or merging changes.

    Arnd
Esben Haabendal May 7, 2024, 7:37 a.m. UTC | #2
"Arnd Bergmann" <arnd@arndb.de> writes:

> On Mon, May 6, 2024, at 12:23, Esben Haabendal wrote:
>>
>>  config PINCTRL_IMXRT1050
>>  	bool "IMXRT1050 pinctrl driver"
>> -	depends on ARCH_MXC
>> +	depends on SOC_IMXRT
>> +	default SOC_IMXRT
>>  	select PINCTRL_IMX
>>  	help
>>  	  Say Y here to enable the imxrt1050 pinctrl driver
>
> Maybe make this
>
>        depends on SOC_IMXRT || COMPILE_TEST

That is done in patch 3/3.

> I see that all the i.MX pinctrl drivers are currently missing
> this, but a lot of other platforms have the ||COMPILE_TEST
> bit so it gets included in x86 allmodconfig tests that
> often gets run before sending or merging changes.

Take a look at patch 3/3 in this series. It does a wholesale addition of
||COMPILE_TEST to these drivers.

/Esben
Arnd Bergmann May 7, 2024, 7:43 a.m. UTC | #3
On Tue, May 7, 2024, at 09:37, Esben Haabendal wrote:
> "Arnd Bergmann" <arnd@arndb.de> writes:
>
>> On Mon, May 6, 2024, at 12:23, Esben Haabendal wrote:
>>>
>>>  config PINCTRL_IMXRT1050
>>>  	bool "IMXRT1050 pinctrl driver"
>>> -	depends on ARCH_MXC
>>> +	depends on SOC_IMXRT
>>> +	default SOC_IMXRT
>>>  	select PINCTRL_IMX
>>>  	help
>>>  	  Say Y here to enable the imxrt1050 pinctrl driver
>>
>> Maybe make this
>>
>>        depends on SOC_IMXRT || COMPILE_TEST
>
> That is done in patch 3/3.
>
>> I see that all the i.MX pinctrl drivers are currently missing
>> this, but a lot of other platforms have the ||COMPILE_TEST
>> bit so it gets included in x86 allmodconfig tests that
>> often gets run before sending or merging changes.
>
> Take a look at patch 3/3 in this series. It does a wholesale addition of
> ||COMPILE_TEST to these drivers.

Ok, great! Sorry I missed that bit. Whole series

Acked-by: Arnd Bergmann <arnd@arndb.de>
diff mbox series

Patch

diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig
index ef39bb6cf9cb..2b19c40978c2 100644
--- a/drivers/pinctrl/freescale/Kconfig
+++ b/drivers/pinctrl/freescale/Kconfig
@@ -193,7 +193,8 @@  config PINCTRL_IMX8ULP
 
 config PINCTRL_IMXRT1050
 	bool "IMXRT1050 pinctrl driver"
-	depends on ARCH_MXC
+	depends on SOC_IMXRT
+	default SOC_IMXRT
 	select PINCTRL_IMX
 	help
 	  Say Y here to enable the imxrt1050 pinctrl driver
@@ -228,7 +229,7 @@  config PINCTRL_IMX28
 
 config PINCTRL_IMXRT1170
 	bool "IMXRT1170 pinctrl driver"
-	depends on ARCH_MXC
+	depends on SOC_IMXRT
 	select PINCTRL_IMX
 	help
 	  Say Y here to enable the imxrt1170 pinctrl driver