]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: rsnd: ssiu: Add shared SSI reset controller support
authorJohn Madieu <john.madieu.xa@bp.renesas.com>
Mon, 25 May 2026 11:02:21 +0000 (11:02 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 1 Jun 2026 14:30:19 +0000 (15:30 +0100)
The RZ/G3E SoC exposes a single shared "ssi-all" reset that gates all
SSI/SSIU modules. Acquire it at SSIU probe and pass it through
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 <john.madieu.xa@bp.renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20260525110230.4014435-10-john.madieu.xa@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/rcar/ssiu.c

index 0cfa84fe5ea869b0b8104637df083be94a301313..2b922ead62d098f8fd35644ad5ad3e4045129bf4 100644 (file)
@@ -510,6 +510,7 @@ int rsnd_ssiu_probe(struct rsnd_priv *priv)
 {
        struct device *dev = rsnd_priv_to_dev(priv);
        struct device_node *node __free(device_node) = rsnd_ssiu_of_node(priv);
+       struct reset_control *rstc;
        struct rsnd_ssiu *ssiu;
        struct rsnd_mod_ops *ops;
        const int *list = NULL;
@@ -564,6 +565,12 @@ int rsnd_ssiu_probe(struct rsnd_priv *priv)
                }
        }
 
+       /* Acquire shared reset once for all SSIU modules */
+       rstc = devm_reset_control_get_optional_shared(dev, "ssi-all");
+       if (IS_ERR(rstc))
+               return dev_err_probe(dev, PTR_ERR(rstc),
+                                    "failed to get ssi-all reset\n");
+
        for_each_rsnd_ssiu(ssiu, priv, i) {
                int ret;
 
@@ -586,7 +593,7 @@ int rsnd_ssiu_probe(struct rsnd_priv *priv)
                }
 
                ret = rsnd_mod_init(priv, rsnd_mod_get(ssiu),
-                                   ops, NULL, NULL, RSND_MOD_SSIU, i);
+                                   ops, NULL, rstc, RSND_MOD_SSIU, i);
                if (ret)
                        return ret;
        }