RE: [PATCH 16/22] ASoC: rsnd: Export module getters for PM support

From: John Madieu

Date: Tue Mar 24 2026 - 14:28:43 EST


Hi Kuninori,

Thank you for the review.

> -----Original Message-----
> From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> Sent: Monday, March 23, 2026 2:45 AM
> To: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> Subject: Re: [PATCH 16/22] ASoC: rsnd: Export module getters for PM
> support
>
>
> Hi John
>
> > Export rsnd_adg_mod_get() and rsnd_ssiu_mod_get() to make them
> > accessible from core.c.
>
> It is *adding* new rsnd_ssiu_mod_get(),
> and exporting rsnd_ssiu_mod_get() different type of features
>

You are right. I'll update the commit message accordingly,
or would prefer it to be split in different patches ?

Regards,
John

> >
> > This is preparation for system suspend/resume support, where the PM
> > callbacks need to iterate over all modules to save and restore their
> > clock and reset state. Other modules (SSI, SRC, CTU, MIX, DVC) already
> > have their getters exported.
> >
> > Signed-off-by: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> > ---
> > sound/soc/renesas/rcar/adg.c | 10 ++++++++++
> > sound/soc/renesas/rcar/rsnd.h | 2 ++ sound/soc/renesas/rcar/ssiu.c |
> > 2 +-
> > 3 files changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/renesas/rcar/adg.c
> > b/sound/soc/renesas/rcar/adg.c index 131a60689f6d..d73f29bc9de7 100644
> > --- a/sound/soc/renesas/rcar/adg.c
> > +++ b/sound/soc/renesas/rcar/adg.c
> > @@ -906,6 +906,16 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
> > return 0;
> > }
> >
> > +struct rsnd_mod *rsnd_adg_mod_get(struct rsnd_priv *priv) {
> > + struct rsnd_adg *adg = rsnd_priv_to_adg(priv);
> > +
> > + if (!adg)
> > + return NULL;
> > +
> > + return rsnd_mod_get(adg);
> > +}
> > +
> > void rsnd_adg_remove(struct rsnd_priv *priv) {
> > struct device *dev = rsnd_priv_to_dev(priv); diff --git
> > a/sound/soc/renesas/rcar/rsnd.h b/sound/soc/renesas/rcar/rsnd.h index
> > a803c0f03665..2cee5c2aa7d7 100644
> > --- a/sound/soc/renesas/rcar/rsnd.h
> > +++ b/sound/soc/renesas/rcar/rsnd.h
> > @@ -628,6 +628,7 @@ int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod
> *cmd_mod,
> > #define rsnd_adg_clk_disable(priv) rsnd_adg_clk_control(priv, 0)
> > int rsnd_adg_clk_control(struct rsnd_priv *priv, int enable); void
> > rsnd_adg_clk_dbg_info(struct rsnd_priv *priv, struct seq_file *m);
> > +struct rsnd_mod *rsnd_adg_mod_get(struct rsnd_priv *priv);
> >
> > /*
> > * R-Car sound priv
> > @@ -824,6 +825,7 @@ int rsnd_ssi_is_dma_mode(struct rsnd_mod *mod);
> > int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
> >
> > #define rsnd_ssi_of_node(priv) rsnd_parse_of_node(priv,
> > RSND_NODE_SSI)
> > +struct rsnd_mod *rsnd_ssiu_mod_get(struct rsnd_priv *priv, int id);
> > void rsnd_parse_connect_ssi(struct rsnd_dai *rdai,
> > struct device_node *playback,
> > struct device_node *capture);
> > diff --git a/sound/soc/renesas/rcar/ssiu.c
> > b/sound/soc/renesas/rcar/ssiu.c index f377d9414633..1462f02c2a7f
> > 100644
> > --- a/sound/soc/renesas/rcar/ssiu.c
> > +++ b/sound/soc/renesas/rcar/ssiu.c
> > @@ -434,7 +434,7 @@ static struct rsnd_mod_ops rsnd_ssiu_ops_gen2 = {
> > DEBUG_INFO
> > };
> >
> > -static struct rsnd_mod *rsnd_ssiu_mod_get(struct rsnd_priv *priv, int
> > id)
> > +struct rsnd_mod *rsnd_ssiu_mod_get(struct rsnd_priv *priv, int id)
> > {
> > if (WARN_ON(id < 0 || id >= rsnd_ssiu_nr(priv)))
> > id = 0;
> > --
> > 2.25.1
> >