Re: [PATCH v3] x86/platform/geode: reference the real node of the cs5535 GPIO controller

From: Borislav Petkov

Date: Thu Jun 11 2026 - 22:13:41 EST


On Thu, Jun 11, 2026 at 09:59:27AM +0200, Bartosz Golaszewski wrote:
> GPIO software node lookup should rely exclusively on matching the
> addresses of the referenced firmware nodes. Commit e5d527be7e69 ("gpio:
> swnode: don't use the swnode's name as the key for GPIO lookup") tried to
> enforce this but had to be reverted: it broke existing users who abuse the
> software node mechanism by creating "dummy" software nodes named after the
> device they want to get GPIOs from, without ever attaching them to the
> actual GPIO devices. Those users rely on GPIOLIB matching the label of the
> GPIO controller against the name of the software node rather than on a real
> firmware node link.
>
> Un-reverting e5d527be7e69 therefore requires converting all such users to
> real firmware node lookup. The geode board setup is one of them: it
> references the cs5535 GPIO controller through a locally-defined dummy node
> named "cs5535-gpio".
>
> The cs5535 MFD driver now exports the software node associated with its
> GPIO controller cell as cs5535_gpio_swnode. Use it as the target of the
> GPIO software node references in geode-common.c instead of the dummy node,
> so the lookup resolves by firmware node address. As the referenced node
> must exist at lookup time, make the cs5535 driver built-in for all boards
> selecting GEODE_COMMON (depend on GPIO_CS5535=y). The node is exported in
> the "CS5535" namespace, so import it in this module.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
> ---
> This is a follow-up to the MFD change that exposed the software node
> associated with the GPIO cell of the cs5535 MFD device.
>
> Merging strategy: it's probably too late for Lee to pick it up but with
> an Ack from the x86 maintainers, I'd still like to queue it through the
> GPIO tree for the v7.2 merge window after the MFD pull request goes
> upstream.
> ---
> Changes in v3:
> - Reworded the commit message as requested by Borislav
> - Link to v2: https://patch.msgid.link/20260522-cs5535-swnode-v2-1-08b2ba64886c@xxxxxxxxxxxxxxxx
>
> Changes in v2:
> - Drop the MFD patch that's already in linux-next
> - Rebase on top of current linux-next
> - Rephrase the commit message, mention the namespace import
> - Link to v1: https://patch.msgid.link/20260429-cs5535-swnode-v1-0-2bc5e17ddcf9@xxxxxxxxxxxxxxxx
> ---
> arch/x86/Kconfig | 10 +++++-----
> arch/x86/platform/geode/geode-common.c | 12 +++++-------
> 2 files changed, 10 insertions(+), 12 deletions(-)

LGTM AFAIU.

Acked-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette