From: John Madieu Date: Mon, 25 May 2026 11:02:28 +0000 (+0000) Subject: ASoC: rsnd: src: Add SRC reset support for RZ/G3E X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33a3500a34b87f370e4d6af73adc2efe8fffc84f;p=thirdparty%2Flinux.git ASoC: rsnd: src: Add SRC reset support for RZ/G3E The RZ/G3E SoC exposes a shared SCU reset controller used by all SRC modules. Acquire it once and pass it through per-instance's rsnd_mod_init() so it is wired into the rsnd_mod->rstc plumbing. devm_reset_control_get_optional_shared() returns NULL when no reset is described in DT, leaving existing R-Car generations unaffected. Signed-off-by: John Madieu Acked-by: Kuninori Morimoto Link: https://patch.msgid.link/20260525110230.4014435-17-john.madieu.xa@bp.renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/renesas/rcar/src.c b/sound/soc/renesas/rcar/src.c index 88ea9aad5caef..cad15fcc37f22 100644 --- a/sound/soc/renesas/rcar/src.c +++ b/sound/soc/renesas/rcar/src.c @@ -720,6 +720,7 @@ int rsnd_src_probe(struct rsnd_priv *priv) { struct device_node *node; struct device *dev = rsnd_priv_to_dev(priv); + struct reset_control *rstc; struct rsnd_src_ctrl *src_ctrl; struct rsnd_src *src; struct clk *clk; @@ -772,6 +773,16 @@ int rsnd_src_probe(struct rsnd_priv *priv) goto rsnd_src_probe_done; } + /* + * Shared SCU reset for every SRC module; acquire once. + * R-Car platforms typically don't have SRC reset controls. + */ + rstc = devm_reset_control_get_optional_shared(dev, "scu"); + if (IS_ERR(rstc)) { + ret = PTR_ERR(rstc); + goto rsnd_src_probe_done; + } + i = 0; for_each_child_of_node_scoped(node, np) { if (!of_device_is_available(np)) @@ -798,7 +809,7 @@ int rsnd_src_probe(struct rsnd_priv *priv) } ret = rsnd_mod_init(priv, rsnd_mod_get(src), - &rsnd_src_ops, clk, NULL, RSND_MOD_SRC, i); + &rsnd_src_ops, clk, rstc, RSND_MOD_SRC, i); if (ret) goto rsnd_src_probe_done;