[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1606394409-12755-2-git-send-email-abel.vesa@nxp.com>
Date: Thu, 26 Nov 2020 14:40:05 +0200
From: Abel Vesa <abel.vesa@....com>
To: Stephen Boyd <sboyd@...nel.org>,
Sascha Hauer <kernel@...gutronix.de>,
Peng Fan <peng.fan@....com>,
Fabio Estevam <fabio.estevam@....com>,
Anson Huang <anson.huang@....com>,
Dong Aisheng <aisheng.dong@....com>,
Jacky Bai <ping.bai@....com>
Cc: NXP Linux Team <linux-imx@....com>, linux-clk@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm-kernel@...ts.infradead.org, Abel Vesa <abel.vesa@....com>
Subject: [PATCH v2 1/5] clk: Add clk_gate_ro_ops for read-only gate clocks
The clocks that can be changed from outside of the clock common framework
scope (for example, EL3) need to have only the .is_enabled gate op.
Signed-off-by: Abel Vesa <abel.vesa@....com>
---
drivers/clk/clk-gate.c | 5 +++++
include/linux/clk-provider.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
index 070dc47..41ca887 100644
--- a/drivers/clk/clk-gate.c
+++ b/drivers/clk/clk-gate.c
@@ -123,6 +123,11 @@ const struct clk_ops clk_gate_ops = {
};
EXPORT_SYMBOL_GPL(clk_gate_ops);
+const struct clk_ops clk_gate_ro_ops = {
+ .is_enabled = clk_gate_is_enabled,
+};
+EXPORT_SYMBOL_GPL(clk_gate_ro_ops);
+
struct clk_hw *__clk_hw_register_gate(struct device *dev,
struct device_node *np, const char *name,
const char *parent_name, const struct clk_hw *parent_hw,
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 86b7075..81ba1aa 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -483,6 +483,7 @@ struct clk_gate {
#define CLK_GATE_BIG_ENDIAN BIT(2)
extern const struct clk_ops clk_gate_ops;
+extern const struct clk_ops clk_gate_ro_ops;
struct clk_hw *__clk_hw_register_gate(struct device *dev,
struct device_node *np, const char *name,
const char *parent_name, const struct clk_hw *parent_hw,
--
2.7.4
Powered by blists - more mailing lists