Skip to content

Commit dc4211c

Browse files
TE-N-ShengjiuWangabelvesa
authored andcommitted
clk: imx: clk-audiomix: Add CLK_SET_RATE_PARENT flags for clocks
Add CLK_SET_RATE_PARENT flags that when the device driver sets the child clock rate, parent clock frequency can be refined accordingly. Signed-off-by: Shengjiu Wang <[email protected]> Reviewed-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abel Vesa <[email protected]>
1 parent 6f0e817 commit dc4211c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/clk/imx/clk-imx8mp-audiomix.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,12 @@ static int clk_imx8mp_audiomix_probe(struct platform_device *pdev)
328328
for (i = 0; i < ARRAY_SIZE(sels); i++) {
329329
if (sels[i].num_parents == 1) {
330330
hw = devm_clk_hw_register_gate_parent_data(dev,
331-
sels[i].name, &sels[i].parent, 0,
331+
sels[i].name, &sels[i].parent, CLK_SET_RATE_PARENT,
332332
base + sels[i].reg, sels[i].shift, 0, NULL);
333333
} else {
334334
hw = devm_clk_hw_register_mux_parent_data_table(dev,
335335
sels[i].name, sels[i].parents,
336-
sels[i].num_parents, 0,
336+
sels[i].num_parents, CLK_SET_RATE_PARENT,
337337
base + sels[i].reg,
338338
sels[i].shift, sels[i].width,
339339
0, NULL, NULL);
@@ -376,7 +376,8 @@ static int clk_imx8mp_audiomix_probe(struct platform_device *pdev)
376376
clk_hw_data->hws[IMX8MP_CLK_AUDIOMIX_SAI_PLL_BYPASS] = hw;
377377

378378
hw = devm_clk_hw_register_gate(dev, "sai_pll_out", "sai_pll_bypass",
379-
0, base + SAI_PLL_GNRL_CTL, 13,
379+
CLK_SET_RATE_PARENT,
380+
base + SAI_PLL_GNRL_CTL, 13,
380381
0, NULL);
381382
if (IS_ERR(hw)) {
382383
ret = PTR_ERR(hw);
@@ -385,7 +386,8 @@ static int clk_imx8mp_audiomix_probe(struct platform_device *pdev)
385386
clk_hw_data->hws[IMX8MP_CLK_AUDIOMIX_SAI_PLL_OUT] = hw;
386387

387388
hw = devm_clk_hw_register_fixed_factor(dev, "sai_pll_out_div2",
388-
"sai_pll_out", 0, 1, 2);
389+
"sai_pll_out",
390+
CLK_SET_RATE_PARENT, 1, 2);
389391
if (IS_ERR(hw)) {
390392
ret = PTR_ERR(hw);
391393
goto err_clk_register;

0 commit comments

Comments
 (0)