Re: [PATCh v3 11/14] ASoC: rsnd: src: Add SRC reset and clock support for RZ/G3E
From: Kuninori Morimoto
Date: Sun Apr 05 2026 - 20:15:41 EST
Hi John
> > > + /*
> > > + * Below values will be filled in rsnd_src_probe()
> > > + */
> > > + struct clk *clk_scu;
> > > + struct clk *clk_scu_x2;
> > > + struct clk *clk_scu_supply;
> >
> > It is SRC specific.
> > Please move it to rsnd_src instead of rsnd_priv.
>
> Agreed. However, since rsnd_src is a per-SRC instance structure,
> I'll rather have these variables static in src.c, as the clocks
> are shared across all SRC instances but used only in that file.
> I hope this is fine for you ?
Ah, OK.
So how about to create new struct rsnd_src_clk or something,
and has above clocks, instead of using file-static, like below.
struct rsnd_priv {
...
+ void *src_clk; // I'm not sure the name ;)
void *src;
int src_nr;
...
};
+ struct rsnd_src_clk { // I'm not sure the name :)
+ struct clk *scu;
+ struct clk *scu_x2;
+ struct clk *scu_supply;
+ };
+ #define rsnd_priv_to_src_clk(priv) ((struct rsnd_src_clk *)(priv)->src_clk)
if (rsnd_priv_to_src_clk(priv))
...
Thank you for your help !!
Best regards
---
Kuninori Morimoto