linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
@ 2022-04-20 14:14 Krzysztof Kozlowski
  2022-04-20 20:44 ` Arnd Bergmann
  2022-04-21  6:59 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-20 14:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Alim Akhtar, Tomasz Figa,
	Sylwester Nawrocki, Linus Walleij, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-gpio
  Cc: Arnd Bergmann, Necip Fazil Yildiran, stable

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]

Always select the GPIOLIB from the Samsung pinctrl drivers to fix the
issue.  This requires removing of OF_GPIO dependency (to avoid recursive
dependency), so add dependency on OF for COMPILE_TEST cases.

Reported-by: Necip Fazil Yildiran <fazilyildiran@gmail.com>
Fixes: eed6b3eb20b9 ("arm64: Split out platform options to separate Kconfig")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Changes since v1:
1. Do not select OF_GPIO and add back dependency on OF (Arnd).

Original report:
https://bugzilla.kernel.org/show_bug.cgi?id=210047
---
 arch/arm/mach-exynos/Kconfig    |  1 -
 drivers/pinctrl/samsung/Kconfig | 11 ++++-------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 51a336f349f4..4d3b40e4049a 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -16,7 +16,6 @@ menuconfig ARCH_EXYNOS
 	select EXYNOS_PMU
 	select EXYNOS_SROM
 	select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS
-	select GPIOLIB
 	select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5
 	select HAVE_ARM_SCU if SMP
 	select PINCTRL
diff --git a/drivers/pinctrl/samsung/Kconfig b/drivers/pinctrl/samsung/Kconfig
index dfd805e76862..7b0576f71376 100644
--- a/drivers/pinctrl/samsung/Kconfig
+++ b/drivers/pinctrl/samsung/Kconfig
@@ -4,14 +4,13 @@
 #
 config PINCTRL_SAMSUNG
 	bool
-	depends on OF_GPIO
+	select GPIOLIB
 	select PINMUX
 	select PINCONF
 
 config PINCTRL_EXYNOS
 	bool "Pinctrl common driver part for Samsung Exynos SoCs"
-	depends on OF_GPIO
-	depends on ARCH_EXYNOS || ARCH_S5PV210 || COMPILE_TEST
+	depends on ARCH_EXYNOS || ARCH_S5PV210 || (COMPILE_TEST && OF)
 	select PINCTRL_SAMSUNG
 	select PINCTRL_EXYNOS_ARM if ARM && (ARCH_EXYNOS || ARCH_S5PV210)
 	select PINCTRL_EXYNOS_ARM64 if ARM64 && ARCH_EXYNOS
@@ -26,12 +25,10 @@ config PINCTRL_EXYNOS_ARM64
 
 config PINCTRL_S3C24XX
 	bool "Samsung S3C24XX SoC pinctrl driver"
-	depends on OF_GPIO
-	depends on ARCH_S3C24XX || COMPILE_TEST
+	depends on ARCH_S3C24XX || (COMPILE_TEST && OF)
 	select PINCTRL_SAMSUNG
 
 config PINCTRL_S3C64XX
 	bool "Samsung S3C64XX SoC pinctrl driver"
-	depends on OF_GPIO
-	depends on ARCH_S3C64XX || COMPILE_TEST
+	depends on ARCH_S3C64XX || (COMPILE_TEST && OF)
 	select PINCTRL_SAMSUNG
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
  2022-04-20 14:14 [PATCH v2] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config Krzysztof Kozlowski
@ 2022-04-20 20:44 ` Arnd Bergmann
  2022-04-21  6:59 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2022-04-20 20:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alim Akhtar, Tomasz Figa, Sylwester Nawrocki, Linus Walleij,
	Linux ARM, moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linux Kernel Mailing List, open list:GPIO SUBSYSTEM,
	Arnd Bergmann, Necip Fazil Yildiran, # 3.4.x

On Wed, Apr 20, 2022 at 4:14 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.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]
>
> Always select the GPIOLIB from the Samsung pinctrl drivers to fix the
> issue.  This requires removing of OF_GPIO dependency (to avoid recursive
> dependency), so add dependency on OF for COMPILE_TEST cases.
>
> Reported-by: Necip Fazil Yildiran <fazilyildiran@gmail.com>
> Fixes: eed6b3eb20b9 ("arm64: Split out platform options to separate Kconfig")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Looks good to me,

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
  2022-04-20 14:14 [PATCH v2] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config Krzysztof Kozlowski
  2022-04-20 20:44 ` Arnd Bergmann
@ 2022-04-21  6:59 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-21  6:59 UTC (permalink / raw)
  To: linux-kernel, linux-samsung-soc, Linus Walleij,
	Sylwester Nawrocki, linux-gpio, linux-arm-kernel,
	Krzysztof Kozlowski, Tomasz Figa, Alim Akhtar
  Cc: Necip Fazil Yildiran, Arnd Bergmann, stable

On Wed, 20 Apr 2022 16:14:07 +0200, Krzysztof Kozlowski 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]
> 
> [...]

Applied, thanks!

[1/1] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
      commit: ac875df4d854ab13d9c4af682a1837a1214fecec

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-21  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 14:14 [PATCH v2] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config Krzysztof Kozlowski
2022-04-20 20:44 ` Arnd Bergmann
2022-04-21  6:59 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).