[PATCH 2/3] clk: add prepare/unprepare helpers
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Dec 8 23:10:01 PST 2022
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 42c64d650d1f..afa62cdccc02 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -71,6 +71,7 @@ struct clk *clk_get(struct device_d *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