Skip to content

Commit cc5c978

Browse files
oortcometbroonie
authored andcommitted
ASoC: rt5682: Register wclk with its parent_hws instead of parent_data
The mclk might not be registered as a fixed clk name "mclk" on some platforms. In those platforms, if the mclk needed to be controlled by codec driver and acquired by a fixed name, it would be a problem. This patch to fix the issue that wclk becomes an orphan due to the fixed mclk's name. Signed-off-by: Derek Fang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent c5ab93e commit cc5c978

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

sound/soc/codecs/rt5682.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2858,7 +2858,6 @@ int rt5682_register_dai_clks(struct rt5682_priv *rt5682)
28582858

28592859
for (i = 0; i < RT5682_DAI_NUM_CLKS; ++i) {
28602860
struct clk_init_data init = { };
2861-
struct clk_parent_data parent_data;
28622861
const struct clk_hw *parent;
28632862

28642863
dai_clk_hw = &rt5682->dai_clks_hw[i];
@@ -2867,10 +2866,8 @@ int rt5682_register_dai_clks(struct rt5682_priv *rt5682)
28672866
case RT5682_DAI_WCLK_IDX:
28682867
/* Make MCLK the parent of WCLK */
28692868
if (rt5682->mclk) {
2870-
parent_data = (struct clk_parent_data){
2871-
.fw_name = "mclk",
2872-
};
2873-
init.parent_data = &parent_data;
2869+
parent = __clk_get_hw(rt5682->mclk);
2870+
init.parent_hws = &parent;
28742871
init.num_parents = 1;
28752872
}
28762873
break;

0 commit comments

Comments
 (0)