[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220515064126.1424-2-linux.amoon@gmail.com>
Date: Sun, 15 May 2022 06:41:18 +0000
From: Anand Moon <linux.amoon@...il.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Amit Kucheria <amitk@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Alim Akhtar <alim.akhtar@...sung.com>,
linux-pm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: Anand Moon <linux.amoon@...il.com>
Subject: [PATCHv2 1/6] thermal: exynos: Enable core tmu hardware clk flag on exynos platform
Use clk_prepare_enable api to enable tmu internal hardware clock
flag on, use clk_disable_unprepare to disable the clock.
Cc: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Signed-off-by: Anand Moon <linux.amoon@...il.com>
---
v1: split te changes and improve the commit message.
---
drivers/thermal/samsung/exynos_tmu.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index f4ab4c5b4b62..75b3afadb5be 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -1054,14 +1054,14 @@ static int exynos_tmu_probe(struct platform_device *pdev)
goto err_sensor;
}
} else {
- ret = clk_prepare(data->clk_sec);
+ ret = clk_prepare_enable(data->clk_sec);
if (ret) {
dev_err(&pdev->dev, "Failed to get clock\n");
goto err_sensor;
}
}
- ret = clk_prepare(data->clk);
+ ret = clk_prepare_enable(data->clk);
if (ret) {
dev_err(&pdev->dev, "Failed to get clock\n");
goto err_clk_sec;
@@ -1122,10 +1122,10 @@ static int exynos_tmu_probe(struct platform_device *pdev)
err_sclk:
clk_disable_unprepare(data->sclk);
err_clk:
- clk_unprepare(data->clk);
+ clk_disable_unprepare(data->clk);
err_clk_sec:
if (!IS_ERR(data->clk_sec))
- clk_unprepare(data->clk_sec);
+ clk_disable_unprepare(data->clk_sec);
err_sensor:
if (!IS_ERR(data->regulator))
regulator_disable(data->regulator);
@@ -1142,9 +1142,9 @@ static int exynos_tmu_remove(struct platform_device *pdev)
exynos_tmu_control(pdev, false);
clk_disable_unprepare(data->sclk);
- clk_unprepare(data->clk);
+ clk_disable_unprepare(data->clk);
if (!IS_ERR(data->clk_sec))
- clk_unprepare(data->clk_sec);
+ clk_disable_unprepare(data->clk_sec);
if (!IS_ERR(data->regulator))
regulator_disable(data->regulator);
--
2.36.1
Powered by blists - more mailing lists