Skip to content

Commit 692f034

Browse files
John Madieubroonie
authored andcommitted
ASoC: rsnd: Add SSI reset support for RZ/G3E platform
Acquire the per-SSI reset controller and pass it through rsnd_mod_init() so it is wired into the rsnd_mod->rstc plumbing. The RZ/G3E SoC exposes one reset line per SSI instance. Use the indexed-name rsnd_devm_reset_control_get_optional_indexed() helper so the same code accepts both the hyphenated RZ/G3E names ("ssi-0", "ssi-1", ...) and the legacy dotted names used by R-Car ("ssi.0", ...). The helper 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-12-john.madieu.xa@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 80f43c5 commit 692f034

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

  • sound/soc/renesas/rcar

sound/soc/renesas/rcar/ssi.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,7 @@ int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
11571157

11581158
int rsnd_ssi_probe(struct rsnd_priv *priv)
11591159
{
1160+
struct reset_control *rstc;
11601161
struct device_node *node;
11611162
struct device *dev = rsnd_priv_to_dev(priv);
11621163
struct rsnd_mod_ops *ops;
@@ -1202,6 +1203,17 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
12021203
goto rsnd_ssi_probe_done;
12031204
}
12041205

1206+
/*
1207+
* RZ/G3E uses per-SSI reset controllers.
1208+
* R-Car platforms typically don't have SSI reset controls.
1209+
*/
1210+
rstc = rsnd_devm_reset_control_get_optional_indexed(dev,
1211+
SSI_NAME, i);
1212+
if (IS_ERR(rstc)) {
1213+
ret = PTR_ERR(rstc);
1214+
goto rsnd_ssi_probe_done;
1215+
}
1216+
12051217
if (of_property_read_bool(np, "shared-pin"))
12061218
rsnd_flags_set(ssi, RSND_SSI_CLK_PIN_SHARE);
12071219

@@ -1220,7 +1232,7 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
12201232
ops = &rsnd_ssi_dma_ops;
12211233

12221234
ret = rsnd_mod_init(priv, rsnd_mod_get(ssi), ops, clk,
1223-
NULL, RSND_MOD_SSI, i);
1235+
rstc, RSND_MOD_SSI, i);
12241236
if (ret)
12251237
goto rsnd_ssi_probe_done;
12261238

0 commit comments

Comments
 (0)