All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES" 
	<linux-samsung-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Necip Fazil Yildiran <fazilyildiran@gmail.com>,
	"# 3.4.x" <stable@vger.kernel.org>
Subject: Re: [PATCH] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
Date: Wed, 20 Apr 2022 14:13:35 +0200	[thread overview]
Message-ID: <0c0b53c3-294a-b1ac-487a-ca96266c4bb7@linaro.org> (raw)
In-Reply-To: <CAK8P3a0uH5KjaobrqUmJQnvMmjkUaR1iC-7jEPjZFjZF1Z-GfQ@mail.gmail.com>

On 20/04/2022 14:10, Arnd Bergmann wrote:
> On Wed, Apr 20, 2022 at 1:55 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]
>>
>> 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>
>>
> 
> 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.

True, OF_GPIO I could skip here.

> 
>>  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.

I don't think OF is the problem here, because the error is in missing
GPIOLIB. The platform selects Samsung pinctrl but it does not select
GPIOLIB. Possible fixes are:
1. Do not select Samsung pinctrl from the platform (but have some
default), so on compile test build it might not work.
2. Select GPIOLIB from the platform (ARMv7 Exynos does it).
3. Select GPIOLIB from here - this is current proposal.


Best regards,
Krzysztof

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES"
	<linux-samsung-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Necip Fazil Yildiran <fazilyildiran@gmail.com>,
	"# 3.4.x" <stable@vger.kernel.org>
Subject: Re: [PATCH] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
Date: Wed, 20 Apr 2022 14:13:35 +0200	[thread overview]
Message-ID: <0c0b53c3-294a-b1ac-487a-ca96266c4bb7@linaro.org> (raw)
In-Reply-To: <CAK8P3a0uH5KjaobrqUmJQnvMmjkUaR1iC-7jEPjZFjZF1Z-GfQ@mail.gmail.com>

On 20/04/2022 14:10, Arnd Bergmann wrote:
> On Wed, Apr 20, 2022 at 1:55 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]
>>
>> 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>
>>
> 
> 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.

True, OF_GPIO I could skip here.

> 
>>  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.

I don't think OF is the problem here, because the error is in missing
GPIOLIB. The platform selects Samsung pinctrl but it does not select
GPIOLIB. Possible fixes are:
1. Do not select Samsung pinctrl from the platform (but have some
default), so on compile test build it might not work.
2. Select GPIOLIB from the platform (ARMv7 Exynos does it).
3. Select GPIOLIB from here - this is current proposal.


Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-20 12:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 11:55 [PATCH] pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config Krzysztof Kozlowski
2022-04-20 11:55 ` Krzysztof Kozlowski
2022-04-20 12:10 ` Arnd Bergmann
2022-04-20 12:10   ` Arnd Bergmann
2022-04-20 12:13   ` Krzysztof Kozlowski [this message]
2022-04-20 12:13     ` Krzysztof Kozlowski
2022-04-20 13:25     ` Arnd Bergmann
2022-04-20 13:25       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c0b53c3-294a-b1ac-487a-ca96266c4bb7@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=arnd@arndb.de \
    --cc=fazilyildiran@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=stable@vger.kernel.org \
    --cc=tomasz.figa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.