ASoC: rsnd: Support hyphen or dot in indexed clock and reset names
authorJohn Madieu <john.madieu.xa@bp.renesas.com>
Mon, 25 May 2026 11:02:16 +0000 (11:02 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 1 Jun 2026 14:30:14 +0000 (15:30 +0100)
commit22622faf8120f2a9887839691743dddb89989499
treed33ca14d6cb2fa5f2e7929baf6beea59e1480340
parent83c9631e974f54106957b23ce30c04f1faa37b57
ASoC: rsnd: Support hyphen or dot in indexed clock and reset names

The rsnd driver historically looks up per-instance clocks and resets
using dot-separated names matching the ones declared in R-Car device
tree bindings ("ssi.0", "src.0", "adg.ssi.0", ...). The dot separator
is unusual for device tree clock-names / reset-names and newer
Renesas SoC bindings (RZ/G3E and later) use the more standard hyphen
form ("ssi-0", "src-0", ...).

Rather than force every existing R-Car user to rename their DT entries,
add a small set of helpers that try the hyphen form first and fall
back to the dot form. While at it, convert the existing indexed
devm_clk_get() call sites in the SSI, SRC, CTU, DVC and MIX probes to use
the new helpers and drop the now unused per-module name buffers and
NAME_SIZE defines.

Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20260525110230.4014435-5-john.madieu.xa@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/rcar/core.c
sound/soc/renesas/rcar/ctu.c
sound/soc/renesas/rcar/dvc.c
sound/soc/renesas/rcar/mix.c
sound/soc/renesas/rcar/rsnd.h
sound/soc/renesas/rcar/src.c
sound/soc/renesas/rcar/ssi.c