Skip to content

Commit 5876ee7

Browse files
wensbebarino
authored andcommitted
clk: mediatek: mt8173: Switch to clk_hw provider APIs
As part of the effort to improve the MediaTek clk drivers, the next step is to switch from the old 'struct clk' clk prodivder APIs to the new 'struct clk_hw' ones. The MT8173 clk driver has one clk that is registered directly with the clk provider APIs, instead of going through the MediaTek clk library. Switch this instance to use the clk_hw provider API. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Miles Chen <miles.chen@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: Miles Chen <miles.chen@mediatek.com> Link: https://lore.kernel.org/r/20220519071610.423372-6-wenst@chromium.org Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 6f691a5 commit 5876ee7

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/clk/mediatek/clk-mt8173.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,6 @@ static void __init mtk_apmixedsys_init(struct device_node *node)
994994
struct clk_hw_onecell_data *clk_data;
995995
void __iomem *base;
996996
struct clk_hw *hw;
997-
struct clk *clk;
998997
int r, i;
999998

1000999
base = of_iomap(node, 0);
@@ -1023,10 +1022,10 @@ static void __init mtk_apmixedsys_init(struct device_node *node)
10231022
clk_data->hws[cku->id] = hw;
10241023
}
10251024

1026-
clk = clk_register_divider(NULL, "hdmi_ref", "tvdpll_594m", 0,
1027-
base + 0x40, 16, 3, CLK_DIVIDER_POWER_OF_TWO,
1028-
NULL);
1029-
clk_data->hws[CLK_APMIXED_HDMI_REF] = __clk_get_hw(clk);
1025+
hw = clk_hw_register_divider(NULL, "hdmi_ref", "tvdpll_594m", 0,
1026+
base + 0x40, 16, 3, CLK_DIVIDER_POWER_OF_TWO,
1027+
NULL);
1028+
clk_data->hws[CLK_APMIXED_HDMI_REF] = hw;
10301029

10311030
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
10321031
if (r)

0 commit comments

Comments
 (0)