[PATCH 4/7] clk: add prepare/unprepare helpers
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Jan 9 07:11:49 PST 2023
barebox doesn't use interrupts, so it need not differentiate between a
possibly sleeping prepare/unprepare and an atomic enable/disable.
Provide a wrapper that just expands to the already existing functions to
simplify porting of Linux kernel drivers.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
include/linux/clk.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 4cece8ba5e67..bffed2bdcfe7 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -71,6 +71,7 @@ struct clk *clk_get(struct device *dev, const char *id);
* Returns success (0) or negative errno.
*/
int clk_enable(struct clk *clk);
+#define clk_prepare_enable(clk) clk_enable(clk)
/**
* clk_disable - inform the system when the clock source is no longer required.
@@ -85,6 +86,7 @@ int clk_enable(struct clk *clk);
* disabled.
*/
void clk_disable(struct clk *clk);
+#define clk_disable_unprepare(clk) clk_disable(clk)
/**
* clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
--
2.30.2
More information about the barebox
mailing list