diff mbox series

[v3,04/10] ASoC: renesas: rsnd: allow to use ADG as standalone

Message ID 87tt6q1a3y.wl-kuninori.morimoto.gx@renesas.com
State Superseded
Headers show
Series ASoC: add Renesas MSIOF sound driver | expand

Commit Message

Kuninori Morimoto April 15, 2025, 1:34 a.m. UTC
Audio clock generator (= ADG) can be used standalone (without DAI),
but current driver indicates error if it doesn't have DAI on DT.
It is not error, allow to use ADG as standalone.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/renesas/rcar/core.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/renesas/rcar/core.c b/sound/soc/renesas/rcar/core.c
index 30afc942d381..4f4ed24cb361 100644
--- a/sound/soc/renesas/rcar/core.c
+++ b/sound/soc/renesas/rcar/core.c
@@ -1482,8 +1482,13 @@  static int rsnd_dai_probe(struct rsnd_priv *priv)
 	int dai_i;
 
 	nr = rsnd_dai_of_node(priv, &is_graph);
+
+	/*
+	 * There is a case that it is used only for ADG (Sound Clock).
+	 * No DAI is not error
+	 */
 	if (!nr)
-		return -EINVAL;
+		return 0;
 
 	rdrv = devm_kcalloc(dev, nr, sizeof(*rdrv), GFP_KERNEL);
 	rdai = devm_kcalloc(dev, nr, sizeof(*rdai), GFP_KERNEL);