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 <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20211227055446.27563-1-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c5ab93e289
commit
cc5c978810
@ -2858,7 +2858,6 @@ int rt5682_register_dai_clks(struct rt5682_priv *rt5682)
|
|||||||
|
|
||||||
for (i = 0; i < RT5682_DAI_NUM_CLKS; ++i) {
|
for (i = 0; i < RT5682_DAI_NUM_CLKS; ++i) {
|
||||||
struct clk_init_data init = { };
|
struct clk_init_data init = { };
|
||||||
struct clk_parent_data parent_data;
|
|
||||||
const struct clk_hw *parent;
|
const struct clk_hw *parent;
|
||||||
|
|
||||||
dai_clk_hw = &rt5682->dai_clks_hw[i];
|
dai_clk_hw = &rt5682->dai_clks_hw[i];
|
||||||
@ -2867,10 +2866,8 @@ int rt5682_register_dai_clks(struct rt5682_priv *rt5682)
|
|||||||
case RT5682_DAI_WCLK_IDX:
|
case RT5682_DAI_WCLK_IDX:
|
||||||
/* Make MCLK the parent of WCLK */
|
/* Make MCLK the parent of WCLK */
|
||||||
if (rt5682->mclk) {
|
if (rt5682->mclk) {
|
||||||
parent_data = (struct clk_parent_data){
|
parent = __clk_get_hw(rt5682->mclk);
|
||||||
.fw_name = "mclk",
|
init.parent_hws = &parent;
|
||||||
};
|
|
||||||
init.parent_data = &parent_data;
|
|
||||||
init.num_parents = 1;
|
init.num_parents = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user