diff mbox series

[RFT,v2,10/14] clk: qcom: smd-rpm: Introduce DEFINE_CLK_SMD_RPM_BUS_KEEPALIVE

Message ID 20230303-topic-rpmcc_sleep-v2-10-ae80a325fe94@linaro.org
State New
Headers show
Series SMD RPMCC sleep preparations | expand

Commit Message

Konrad Dybcio March 8, 2023, 9:35 p.m. UTC
In preparation for supporting keepalive clocks which can never be shut off
(as the platform would fall apart otherwise), add a macro for defining
such clocks.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/clk/qcom/clk-smd-rpm.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
index d89918f9ae60..8e25b3d7d30c 100644
--- a/drivers/clk/qcom/clk-smd-rpm.c
+++ b/drivers/clk/qcom/clk-smd-rpm.c
@@ -127,6 +127,11 @@ 
 		_name##_clk, _name##_a_clk, QCOM_SMD_RPM_BUS_CLK, r_id,	      \
 		QCOM_RPM_SMD_KEY_RATE, 0)
 
+#define DEFINE_CLK_SMD_RPM_BUS_KEEP_ALIVE(_name, r_id)			      \
+		__DEFINE_CLK_SMD_RPM_AO_PREFIX(bus_##r_id##_,		      \
+		_name##_clk, _name##_a_keep_alive_clk, QCOM_SMD_RPM_BUS_CLK,  \
+		r_id, QCOM_RPM_SMD_KEY_RATE, CLK_IS_CRITICAL, true)
+
 #define DEFINE_CLK_SMD_RPM_CLK_SRC(_name, type, r_id)			      \
 		__DEFINE_CLK_SMD_RPM(					      \
 		_name##_clk_src, _name##_a_clk_src,			      \