| /* SPDX-License-Identifier: GPL-2.0-only */ |
| * Copyright (c) 2014 MediaTek Inc. |
| * Author: James Liao <jamesjj.liao@mediatek.com> |
| #include <linux/regmap.h> |
| #include <linux/clk-provider.h> |
| static inline struct mtk_clk_gate *to_mtk_clk_gate(struct clk_hw *hw) |
| return container_of(hw, struct mtk_clk_gate, hw); |
| extern const struct clk_ops mtk_clk_gate_ops_setclr; |
| extern const struct clk_ops mtk_clk_gate_ops_setclr_inv; |
| extern const struct clk_ops mtk_clk_gate_ops_no_setclr; |
| extern const struct clk_ops mtk_clk_gate_ops_no_setclr_inv; |
| struct clk *mtk_clk_register_gate( |
| const struct clk_ops *ops, |
| #define GATE_MTK_FLAGS(_id, _name, _parent, _regs, _shift, \ |
| .parent_name = _parent, \ |
| #define GATE_MTK(_id, _name, _parent, _regs, _shift, _ops) \ |
| GATE_MTK_FLAGS(_id, _name, _parent, _regs, _shift, _ops, 0) |
| #endif /* __DRV_CLK_GATE_H */ |