[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0uH5KjaobrqUmJQnvMmjkUaR1iC-7jEPjZFjZF1Z-GfQ@mail.gmail.com>
Date: Wed, 20 Apr 2022 14:10:03 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Alim Akhtar <alim.akhtar@...sung.com>,
Tomasz Figa <tomasz.figa@...il.com>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Linus Walleij <linus.walleij@...aro.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES"
<linux-samsung-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Necip Fazil Yildiran <fazilyildiran@...il.com>,
"# 3.4.x" <stable@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
On Wed, Apr 20, 2022 at 1:55 PM Krzysztof Kozlowski
<krzysztof.kozlowski@...aro.org> wrote:
>
> The Samsung pinctrl drivers depend on OF_GPIO, which is part of GPIOLIB.
> ARMv7 Exynos platform selects GPIOLIB and Samsung pinctrl drivers. ARMv8
> Exynos selects only the latter leading to possible wrong configuration
> on ARMv8 build:
>
> WARNING: unmet direct dependencies detected for PINCTRL_EXYNOS
> Depends on [n]: PINCTRL [=y] && OF_GPIO [=n] && (ARCH_EXYNOS [=y] || ARCH_S5PV210 || COMPILE_TEST [=y])
> Selected by [y]:
> - ARCH_EXYNOS [=y]
>
> Reported-by: Necip Fazil Yildiran <fazilyildiran@...il.com>
> Fixes: eed6b3eb20b9 ("arm64: Split out platform options to separate Kconfig")
> Cc: <stable@...r.kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
>
This does not look like a correct fix:
> diff --git a/drivers/pinctrl/samsung/Kconfig b/drivers/pinctrl/samsung/Kconfig
> index dfd805e76862..c852fd1dd284 100644
> --- a/drivers/pinctrl/samsung/Kconfig
> +++ b/drivers/pinctrl/samsung/Kconfig
> @@ -4,13 +4,13 @@
> #
> config PINCTRL_SAMSUNG
> bool
> - depends on OF_GPIO
> + select GPIOLIB
> + select OF_GPIO
> select PINMUX
> select PINCONF
OF_GPIO is an automatic symbol that is always enabled when both
GPIOLIB and OF are enabled. Selecting it from somewhere else cannot
really work at all. I see we have a few other instances and should probably
fix those as well.
> config PINCTRL_EXYNOS
> bool "Pinctrl common driver part for Samsung Exynos SoCs"
> - depends on OF_GPIO
> depends on ARCH_EXYNOS || ARCH_S5PV210 || COMPILE_TEST
> select PINCTRL_SAMSUNG
> select PINCTRL_EXYNOS_ARM if ARM && (ARCH_EXYNOS || ARCH_S5PV210)
The problem here is that PINCTRL_EXYNOS and the others can be built for
compile-testing without CONFIG_OF on non-arm machines.
I think the correct dependency line would be
depends on ARCH_EXYNOS || ARCH_S5PV210 || (COMPILE_TEST && OF)
which guarantees that OF_GPIO is also enabled.
Arnd
Powered by blists - more mailing lists