[PATCH] gpio: fix up CONFIG_OF dependencies
Arnd Bergmann
arnd at arndb.de
Wed Mar 25 03:41:04 PDT 2026
On Wed, Mar 25, 2026, at 11:32, Bartosz Golaszewski wrote:
> On Wed, 25 Mar 2026 11:01:14 +0100, Arnd Bergmann <arnd at kernel.org> said:
>>
>> WARNING: unmet direct dependencies detected for GPIO_SYSCON
>> Depends on [n]: GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF [=n]
>> Selected by [y]:
>> - GPIO_SAMA5D2_PIOBU [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && (ARCH_AT91 || COMPILE_TEST [=y])
>>
>
> Thanks and sorry for the breakage. However, I'm wondering if it wouldn't make
> sense to do the following:
>
>
> -#if defined(CONFIG_OF_GPIO)
> /*
> * If CONFIG_OF_GPIO is enabled, then all GPIO controllers described in
> * the device tree automatically may have an OF translation
...
> Symbols from linux/of.h are stubbed out and these drivers can build just fine
> with !CONFIG_OF. This would naturally increase the build coverage.
I don't think we need to worry about the build coverage here, CONFIG_OF
is still included in x86 allmodconfig and half the randconfig builds,
so the drivers get enough exposure either way.
On the other hand, dropping the build time check may help avoid
future Kconfig dependency issues, so that still sounds like a
reasonable suggestion. At least CONFIG_GPIO_SAMA5D2_PIOBU
is going to need the 'depends on OF' regardless though to work
around the other build error I cited above.
Arnd
More information about the Linux-mediatek
mailing list