Skip to contentSkip to conversation

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

PATCH In review Akshu Agrawal 2 participants 2 messages Sep 7, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt5682: Have global name clock option for parent clk

When adding parent clk(mclk) to wclk, this adds fallback option for the case where global clk name is used.

---
 sound/soc/codecs/rt5682.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/codecs/rt5682.c +1 -0
index 93ebf0279b62..26928bc49bcb 100644
@@ -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;
 			}
Signature · 1 line
2.20.1
maintainer
#1 lore raw

sound/soc/codecs/rt5682.c static int rt5682_register_dai_clks(struct snd_soc_component *component) · line 2786

Quoted 11 lines · Akshu Agrawal

When adding parent clk(mclk) to wclk, this adds fallback option for the case where global clk name is used.

sound/soc/codecs/rt5682.c +1 -0
@@ -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?