diff mbox series

[RFC,6/9] clk: qcom: common: Add macro wrapper for all clock types

Message ID 20220726142303.4126434-7-abel.vesa@linaro.org (mailing list archive)
State Rejected
Headers show
Series clk: qcom: gcc-sdm845: Swicth from expanded definitions to compact macros | expand

Commit Message

Abel Vesa July 26, 2022, 2:23 p.m. UTC
Add a generic macro that uses the clk_type to figure out which
clock type specific macro to call.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 drivers/clk/qcom/common.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Dmitry Baryshkov July 26, 2022, 4:48 p.m. UTC | #1
On Tue, 26 Jul 2022 at 17:23, Abel Vesa <abel.vesa@linaro.org> wrote:
>
> Add a generic macro that uses the clk_type to figure out which
> clock type specific macro to call.
>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
>  drivers/clk/qcom/common.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
> index 9c8f7b798d9f..475febd19dba 100644
> --- a/drivers/clk/qcom/common.h
> +++ b/drivers/clk/qcom/common.h
> @@ -19,6 +19,9 @@ struct clk_hw;
>  #define PLL_VOTE_FSM_ENA       BIT(20)
>  #define PLL_VOTE_FSM_RESET     BIT(21)
>
> +#define DEFINE_QCOM_CC_CLK(clk_type, ...)      \
> +       DEFINE_QCOM_CC_CLK_##clk_type(__VA_ARGS__)

Please drop this macro. It would make extremely hard to follow the
definitions. Without it I can just jump-tag to follow the
DEFINE_QCOM_CC_CLK_RCG2_SHARED_SOMETHING_EXTRA. With this macro in
place there would be no way to do this.
diff mbox series

Patch

diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
index 9c8f7b798d9f..475febd19dba 100644
--- a/drivers/clk/qcom/common.h
+++ b/drivers/clk/qcom/common.h
@@ -19,6 +19,9 @@  struct clk_hw;
 #define PLL_VOTE_FSM_ENA	BIT(20)
 #define PLL_VOTE_FSM_RESET	BIT(21)
 
+#define DEFINE_QCOM_CC_CLK(clk_type, ...)	\
+	DEFINE_QCOM_CC_CLK_##clk_type(__VA_ARGS__)
+
 struct qcom_cc_desc {
 	const struct regmap_config *config;
 	struct clk_regmap **clks;