mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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>
This commit is contained in:
parent
e4c23e19aa
commit
327aa74156
1 changed files with 5 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include <linux/clk-provider.h>
|
#include <linux/clk-provider.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/pm_runtime.h>
|
||||||
|
|
||||||
#include "clk-mtk.h"
|
#include "clk-mtk.h"
|
||||||
#include "clk-gate.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 clk_onecell_data *clk_data;
|
||||||
struct device_node *node = pdev->dev.of_node;
|
struct device_node *node = pdev->dev.of_node;
|
||||||
|
|
||||||
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
|
||||||
clk_data = mtk_alloc_clk_data(CLK_MFG_NR_CLK);
|
clk_data = mtk_alloc_clk_data(CLK_MFG_NR_CLK);
|
||||||
|
|
||||||
mtk_clk_register_gates(node, mfg_clks, ARRAY_SIZE(mfg_clks),
|
mtk_clk_register_gates_with_dev(node, mfg_clks, ARRAY_SIZE(mfg_clks),
|
||||||
clk_data);
|
clk_data, &pdev->dev);
|
||||||
|
|
||||||
return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
|
return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue