pinctrl: renesas: rzv2m: Handle non-unique subnode names
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 3 Jul 2023 15:07:06 +0000 (17:07 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 10 Jul 2023 08:00:22 +0000 (10:00 +0200)
commitf46a0b47cc0829acd050213194c5a77351e619b2
tree38e540656eb1bc17fb64ac3db9ab865d45151d87
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
pinctrl: renesas: rzv2m: Handle non-unique subnode names

The eMMC and SDHI pin control configuration nodes in DT have subnodes
with the same names ("data" and "ctrl").  As the RZ/V2M pin control
driver considers only the names of the subnodes, this leads to
conflicts:

    pinctrl-rzv2m b6250000.pinctrl: pin P8_2 already requested by 85000000.mmc; cannot claim for 85020000.mmc
    pinctrl-rzv2m b6250000.pinctrl: pin-130 (85020000.mmc) status -22
    renesas_sdhi_internal_dmac 85020000.mmc: Error applying setting, reverse things back

Fix this by constructing unique names from the node names of both the
pin control configuration node and its child node, where appropriate.

Reported by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>

Fixes: 92a9b825257614af ("pinctrl: renesas: Add RZ/V2M pin and gpio controller driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Link: https://lore.kernel.org/r/607bd6ab4905b0b1b119a06ef953fa1184505777.1688396717.git.geert+renesas@glider.be
drivers/pinctrl/renesas/pinctrl-rzv2m.c