From f3e2d69be45ff8906aac783d30dcde401d9a1874 Mon Sep 17 00:00:00 2001 From: Taniya Das Date: Sat, 29 Aug 2020 00:54:52 +0530 Subject: [PATCH] clk: qcom: clk-debug: Detach the clock request from syscon regmap syscon_regmap_lookup_by_phandle prepares the 0th clk handle provided in the device node. The debug clock controller prepares/enables/disables the required clock, thus it is safe to detach the clock to remove the undesired clock prepare votes. Change-Id: Ibacac8161ba8244c170a87f172c3ad9029625ed7 Signed-off-by: Taniya Das --- drivers/clk/qcom/clk-debug.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/clk/qcom/clk-debug.c b/drivers/clk/qcom/clk-debug.c index b4157741fc3e..9835ea8fbe8e 100644 --- a/drivers/clk/qcom/clk-debug.c +++ b/drivers/clk/qcom/clk-debug.c @@ -357,6 +357,14 @@ int map_debug_bases(struct platform_device *pdev, const char *base, PTR_ERR(mux->regmap)); return PTR_ERR(mux->regmap); } + + /* + * syscon_regmap_lookup_by_phandle prepares the 0th clk handle provided + * in the device node. The debug clock controller prepares/enables/ + * disables the required clock, thus detach the clock. + */ + regmap_mmio_detach_clk(mux->regmap); + return 0; } EXPORT_SYMBOL(map_debug_bases);