diff options
author | Weiyi Lu <weiyi.lu@mediatek.com> | 2019-09-02 11:00:58 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2019-09-17 19:22:49 +0200 |
commit | 327aa741563806f8b67fbf5e665be203acf5f4f5 (patch) | |
tree | 9f5d622aebafad9c88d1c22c14ae02fffe429d70 /drivers/clk/mediatek | |
parent | clk: mediatek: Register clock gate with device (diff) | |
download | linux-327aa741563806f8b67fbf5e665be203acf5f4f5.tar.xz linux-327aa741563806f8b67fbf5e665be203acf5f4f5.zip |
clk: mediatek: Runtime PM support for MT8183 mcucfg clock provider
Enable the runtime PM support and forward the struct device pointer for
registration of MT8183 mcucfg clocks.
Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Link: https://lkml.kernel.org/r/1567414859-3244-3-git-send-email-weiyi.lu@mediatek.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/mediatek')
-rw-r--r-- | drivers/clk/mediatek/clk-mt8183-mfgcfg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c index 99a6b020833e..37b4162c5882 100644 --- a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c +++ b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c @@ -5,6 +5,7 @@ #include <linux/clk-provider.h> #include <linux/platform_device.h> +#include <linux/pm_runtime.h> #include "clk-mtk.h" #include "clk-gate.h" @@ -30,10 +31,12 @@ static int clk_mt8183_mfg_probe(struct platform_device *pdev) struct clk_onecell_data *clk_data; struct device_node *node = pdev->dev.of_node; + pm_runtime_enable(&pdev->dev); + clk_data = mtk_alloc_clk_data(CLK_MFG_NR_CLK); - mtk_clk_register_gates(node, mfg_clks, ARRAY_SIZE(mfg_clks), - clk_data); + mtk_clk_register_gates_with_dev(node, mfg_clks, ARRAY_SIZE(mfg_clks), + clk_data, &pdev->dev); return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); } |