@@ -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,
@@ -485,6 +485,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,
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@nxp.com> --- drivers/clk/clk-gate.c | 5 +++++ include/linux/clk-provider.h | 1 + 2 files changed, 6 insertions(+)