diff mbox series

ASoC: rt5682: Have global name clock option for parent clk

Message ID 20200907040038.3124-1-akshu.agrawal@amd.com (mailing list archive)
State New, archived
Headers show
Series ASoC: rt5682: Have global name clock option for parent clk | expand

Commit Message

Akshu Agrawal Sept. 7, 2020, 4 a.m. UTC
When adding parent clk(mclk) to wclk, this adds fallback option
for the case where global clk name is used.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
---
 sound/soc/codecs/rt5682.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Brown Sept. 7, 2020, 11:06 a.m. UTC | #1
On Mon, Sep 07, 2020 at 09:30:37AM +0530, Akshu Agrawal wrote:
> When adding parent clk(mclk) to wclk, this adds fallback option
> for the case where global clk name is used.

> @@ -2780,6 +2780,7 @@ static int rt5682_register_dai_clks(struct snd_soc_component *component)
>  			if (rt5682->mclk) {
>  				init.parent_data = &(struct clk_parent_data){
>  					.fw_name = "mclk",
> +					.name = __clk_get_name(rt5682->mclk),
>  				};
>  				init.num_parents = 1;
>  			}

I don't understand this change - we clearly already have the clock so
why can't we just use whatever we used when we originally looked it up
here?
diff mbox series

Patch

diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index 93ebf0279b62..26928bc49bcb 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -2780,6 +2780,7 @@  static int rt5682_register_dai_clks(struct snd_soc_component *component)
 			if (rt5682->mclk) {
 				init.parent_data = &(struct clk_parent_data){
 					.fw_name = "mclk",
+					.name = __clk_get_name(rt5682->mclk),
 				};
 				init.num_parents = 1;
 			}