RE: [PATCH 12/22] ASoC: rsnd: Update SSI for RZ/G3E support

From: John Madieu

Date: Tue Mar 24 2026 - 14:26:56 EST


Hi Kuninori,

> -----Original Message-----
> From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> Sent: Monday, March 23, 2026 2:33 AM
> To: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> Subject: Re: [PATCH 12/22] ASoC: rsnd: Update SSI for RZ/G3E support
>
>
> Hi John
>
> > Add SSI support for the Renesas RZ/G3E SoC, which differs from earlier
> > generations in several ways:
> >
> > - The SSI block always operates in BUSIF mode; RZ/G3E does not
> implement
> > the SSITDR/SSIRDR registers used by R-Car Gen2/Gen3/Gen4 for direct
> SSI
> > DMA.
> > Consequently, all audio data must pass through BUSIF.
> > - Each SSI instance has its own reset line, exposed using per-SSI names
> > such as "ssi0", "ssi1", etc., rather than a single shared reset.
> >
> > To support these differences, update rsnd_ssi_use_busif() to always
> > return 1 on RZ/G3E, ensuring that the driver consistently selects the
> > BUSIF DMA path. Also update the reset acquisition logic to request the
> > appropriate per-SSI reset controller based on the SSI instance name.
> >
> > Signed-off-by: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> > ---
> (snip)
> > @@ -865,6 +872,8 @@ static int rsnd_ssi_common_remove(struct rsnd_mod
> *mod,
> > rsnd_flags_del(ssi, RSND_SSI_PROBED);
> > }
> >
> > + rsnd_dma_detach(io, mod, &io->dma);
> > +
> > return 0;
> > }
>
> Why do we need it ?

You are right. DMA modules are devm-allocated and have no
.remove callback, so cleanup is handled automatically. I'll
drop it in next version.

>
> > @@ -1207,6 +1217,16 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
> > goto rsnd_ssi_probe_done;
> > }
> >
> > + /*
> > + * RZ/G3E uses per-SSI reset controllers.
> > + * R-Car platforms typically don't have SSI reset controls.
> > + */
> > + rstc = devm_reset_control_get_optional(dev, name);
> > + if (IS_ERR(rstc)) {
> > + ret = PTR_ERR(rstc);
> > + goto rsnd_ssi_probe_done;
> > + }
>
> So, all R-Car platforms will be handled as error ?

No - devm_reset_control_get_optional() returns NULL when the reset
control is not found in the device tree (which is the case for R-Car
platforms). The IS_ERR() check only catches the actual errors. So,
R-Car platforms will simply get rstc = NULL and continue normally.

This is the same pattern used for audmac-pp clock/reset handling.

Regards,
John

>
> Thank you for your help !!
>
> Best regards
> ---
> Kuninori Morimoto