#include <linux/clk-provider.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/printk.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/types.h>
#include "clk-gate.h"
struct mtk_clk_gate { … };
static inline struct mtk_clk_gate *to_mtk_clk_gate(struct clk_hw *hw)
{ … }
static u32 mtk_get_clockgating(struct clk_hw *hw)
{ … }
static int mtk_cg_bit_is_cleared(struct clk_hw *hw)
{ … }
static int mtk_cg_bit_is_set(struct clk_hw *hw)
{ … }
static void mtk_cg_set_bit(struct clk_hw *hw)
{ … }
static void mtk_cg_clr_bit(struct clk_hw *hw)
{ … }
static void mtk_cg_set_bit_no_setclr(struct clk_hw *hw)
{ … }
static void mtk_cg_clr_bit_no_setclr(struct clk_hw *hw)
{ … }
static int mtk_cg_enable(struct clk_hw *hw)
{ … }
static void mtk_cg_disable(struct clk_hw *hw)
{ … }
static int mtk_cg_enable_inv(struct clk_hw *hw)
{ … }
static void mtk_cg_disable_inv(struct clk_hw *hw)
{ … }
static int mtk_cg_enable_no_setclr(struct clk_hw *hw)
{ … }
static void mtk_cg_disable_no_setclr(struct clk_hw *hw)
{ … }
static int mtk_cg_enable_inv_no_setclr(struct clk_hw *hw)
{ … }
static void mtk_cg_disable_inv_no_setclr(struct clk_hw *hw)
{ … }
const struct clk_ops mtk_clk_gate_ops_setclr = …;
EXPORT_SYMBOL_GPL(…);
const struct clk_ops mtk_clk_gate_ops_setclr_inv = …;
EXPORT_SYMBOL_GPL(…);
const struct clk_ops mtk_clk_gate_ops_no_setclr = …;
EXPORT_SYMBOL_GPL(…);
const struct clk_ops mtk_clk_gate_ops_no_setclr_inv = …;
EXPORT_SYMBOL_GPL(…);
static struct clk_hw *mtk_clk_register_gate(struct device *dev, const char *name,
const char *parent_name,
struct regmap *regmap, int set_ofs,
int clr_ofs, int sta_ofs, u8 bit,
const struct clk_ops *ops,
unsigned long flags)
{ … }
static void mtk_clk_unregister_gate(struct clk_hw *hw)
{ … }
int mtk_clk_register_gates(struct device *dev, struct device_node *node,
const struct mtk_gate *clks, int num,
struct clk_hw_onecell_data *clk_data)
{ … }
EXPORT_SYMBOL_GPL(…);
void mtk_clk_unregister_gates(const struct mtk_gate *clks, int num,
struct clk_hw_onecell_data *clk_data)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_LICENSE(…) …;