pinctrl: renesas: rzg2l: Handle non-unique subnode names
authorBiju Das <biju.das.jz@bp.renesas.com>
Tue, 4 Jul 2023 11:18:58 +0000 (12:18 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 10 Jul 2023 08:00:27 +0000 (10:00 +0200)
commitbfc374a145ae133613e05b9b89be561f169cb58d
tree556a429056ce272feda897fd51ed049dbf4be466
parentf46a0b47cc0829acd050213194c5a77351e619b2
pinctrl: renesas: rzg2l: Handle non-unique subnode names

Currently, sd1 and sd0 have unique subnode names 'sd1_mux' and 'sd0_mux'.
If we change these to non-unique subnode names such as 'mux' this can
lead to the below conflict as the RZ/G2L pin control driver considers
only the names of the subnodes.

   pinctrl-rzg2l 11030000.pinctrl: pin P47_0 already requested by 11c00000.mmc; cannot claim for 11c10000.mmc
   pinctrl-rzg2l 11030000.pinctrl: pin-376 (11c10000.mmc) status -22
   pinctrl-rzg2l 11030000.pinctrl: could not request pin 376 (P47_0) from group mux  on device pinctrl-rzg2l
   renesas_sdhi_internal_dmac 11c10000.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.

Based on the work done by Geert for the RZ/V2M pinctrl driver.

Fixes: c4c4637eb57f ("pinctrl: renesas: Add RZ/G2L pin and gpio controller driver")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230704111858.215278-1-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c