Re: [PATCH v5 13/14] ASoC: rsnd: Support unprefixed DT node names for RZ/G3E

From: Kuninori Morimoto

Date: Thu Apr 16 2026 - 23:46:28 EST



Hi John

Thank you for your patch

> The RZ/G3E device tree binding uses standard unprefixed node names
> ('ssi', 'ssiu', 'src', 'dvc', 'mix', 'ctu', 'dai') instead of the
> legacy 'rcar_sound,' prefixed names used by R-Car bindings.
>
> Convert rsnd_parse_of_node() from a macro into a function that tries
> the legacy prefixed name first, then falls back to the unprefixed
> name by stripping the "rcar_sound," prefix. This makes the driver
> work transparently with both old and new bindings.
>
> While at it, update the of_node_name_eq() calls in core.c which compare
> against RSND_NODE_DAI directly (bypassing rsnd_parse_of_node()),
> and fix the related comments in ssiu.c, ssi.c, and dma.c that
> reference hardcoded "rcar_sound,ssiu" / "rcar_sound,ssi" names.
>
> Signed-off-by: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> ---
(snip)
> +struct device_node *rsnd_parse_of_node(struct rsnd_priv *priv, const char *name)
> +{
> + struct device_node *np = rsnd_priv_to_dev(priv)->of_node;
> + struct device_node *node;
> + const char *unprefixed;
> +
> + node = of_get_child_by_name(np, name);
> + if (node)
> + return node;
> +
> + /*
> + * RZ/G3E binding uses unprefixed node names (e.g. "ssi" instead
> + * of "rcar_sound,ssi"). Try stripping the "rcar_sound," prefix.
> + */
> + unprefixed = strchr(name, ',');
> + if (unprefixed)
> + node = of_get_child_by_name(np, unprefixed + 1);
> +
> + return node;
> +}

I think it is better to have name get function, and use it on parse func ?

char *rsnd_xx_name(node, name)
{
char *sub_name;

/* name = "rcar_sound,ssi" */
ret = of_node_name_eq(node, name);
if (ret == 0)
return name;

/* sub_name = "ssi" */
sub_name = strchr(name, ",");
ret = of_node_name_eq(node, sub_name);
if (ret == 0)
return sub_name;

return NULL;
}


> @@ -1273,7 +1294,8 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph)
> of_node_put(node);
>
> for_each_child_of_node_scoped(np, node) {
> - if (!of_node_name_eq(node, RSND_NODE_DAI))
> + if (!of_node_name_eq(node, RSND_NODE_DAI) &&
> + !of_node_name_eq(node, "dai"))
> continue;

If driver is handling almost same things individually and/or randomly in per
each places, it will eventually lose consistency.

rsnd_xx_name() can keep consistency ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto