]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: rsnd: Add ADG reset support for RZ/G3E
authorJohn Madieu <john.madieu.xa@bp.renesas.com>
Mon, 25 May 2026 11:02:24 +0000 (11:02 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 1 Jun 2026 14:30:22 +0000 (15:30 +0100)
RZ/G3E requires the ADG reset line to be deasserted for the audio
subsystem to operate. The ADG module clock is already managed via
rsnd_adg_clk_enable/disable() through adg->adg, so no additional
clock handling is needed.

Add support for the optional "adg" reset control on Renesas RZ/G3E SoC.

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-13-john.madieu.xa@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/rcar/adg.c

index 0105c60a144e038d5a7a4dd9b7af4867a080c2dc..813ad5eabba616193719ed5a8cd04764f1dd8255 100644 (file)
@@ -771,6 +771,7 @@ void rsnd_adg_clk_dbg_info(struct rsnd_priv *priv, struct seq_file *m)
 
 int rsnd_adg_probe(struct rsnd_priv *priv)
 {
+       struct reset_control *rstc;
        struct rsnd_adg *adg;
        struct device *dev = rsnd_priv_to_dev(priv);
        int ret;
@@ -779,8 +780,11 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
        if (!adg)
                return -ENOMEM;
 
-       ret = rsnd_mod_init(priv, &adg->mod, &adg_ops,
-                     NULL, NULL, 0, 0);
+       rstc = devm_reset_control_get_optional_exclusive(dev, "adg");
+       if (IS_ERR(rstc))
+               return dev_err_probe(dev, PTR_ERR(rstc), "failed to get adg reset\n");
+
+       ret = rsnd_mod_init(priv, &adg->mod, &adg_ops, NULL, rstc, 0, 0);
        if (ret)
                return ret;