[PATCH 14/17] pinctrl: renesas: Move fixed assignments to 'pinctrl_desc' definition
Geert Uytterhoeven
geert at linux-m68k.org
Fri May 30 18:06:16 AEST 2025
Hi Krzysztof,
CC wsa
On Wed, 28 May 2025 at 19:55, Krzysztof Kozlowski
<krzysztof.kozlowski at linaro.org> wrote:
> On 28/05/2025 14:54, Geert Uytterhoeven wrote:
> >> .pmxops = &rzn1_pmx_ops,
> >> .confops = &rzn1_pinconf_ops,
> >> .owner = THIS_MODULE,
> >> + .pins = rzn1_pins,
> >> + .npins = ARRAY_SIZE(rzn1_pins),
> >> };
> >>
> >> static int rzn1_pinctrl_parse_groups(struct device_node *np,
> >> @@ -878,8 +880,6 @@ static int rzn1_pinctrl_probe(struct platform_device *pdev)
> >>
> >> ipctl->dev = &pdev->dev;
> >> rzn1_pinctrl_desc.name = dev_name(&pdev->dev);
> >
> > ... if you would replace this assignment by a hardcoded name
> > like "pinctrl-rzn1".
>
> I saw it, but this would not be equivalent. dev_name includes platform
> bus id, e.g. pinctrl-rzn1.0 which might matter here - conflict of names.
> Are you sure this would work fine?
There can be only one anyway.
Most drivers used a fixed name:
drivers/pinctrl/renesas/pinctrl-rza1.c: rza1_pctl->desc.name = DRIVER_NAME;
drivers/pinctrl/renesas/pinctrl-rza2.c: priv->desc.name = DRIVER_NAME;
drivers/pinctrl/renesas/pinctrl-rzg2l.c: pctrl->desc.name = DRV_NAME;
drivers/pinctrl/renesas/pinctrl-rzn1.c: rzn1_pinctrl_desc.name =
dev_name(&pdev->dev);
drivers/pinctrl/renesas/pinctrl-rzt2h.c: desc->name = DRV_NAME;
drivers/pinctrl/renesas/pinctrl-rzv2m.c: pctrl->desc.name = DRV_NAME;
drivers/pinctrl/renesas/pinctrl.c: pmx->pctl_desc.name = DRV_NAME;
It might change the path in debugfs (/sys/kernel/debug/pinctrl/) though.
Wolfram?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
More information about the Linux-aspeed
mailing list