#include <linux/delay.h>
#include <linux/clkdev.h>
#include <linux/mfd/syscon.h>
+#include <linux/device.h>
#include "clk-mtk.h"
#include "clk-gate.h"
}
}
-int mtk_clk_register_gates(struct device_node *node,
+int mtk_clk_register_gates_with_dev(struct device_node *node,
const struct mtk_gate *clks,
- int num, struct clk_onecell_data *clk_data)
+ int num, struct clk_onecell_data *clk_data,
+ struct device *dev)
{
int i;
struct clk *clk;
gate->regs->set_ofs,
gate->regs->clr_ofs,
gate->regs->sta_ofs,
- gate->shift, gate->ops, gate->flags);
+ gate->shift, gate->ops, gate->flags, dev);
if (IS_ERR(clk)) {
pr_err("Failed to register clk %s: %ld\n",
return 0;
}
+int mtk_clk_register_gates(struct device_node *node,
+ const struct mtk_gate *clks,
+ int num, struct clk_onecell_data *clk_data)
+{
+ return mtk_clk_register_gates_with_dev(node,
+ clks, num, clk_data, NULL);
+}
+
struct clk *mtk_clk_register_composite(const struct mtk_composite *mc,
void __iomem *base, spinlock_t *lock)
{
const struct mtk_gate *clks, int num,
struct clk_onecell_data *clk_data);
+int mtk_clk_register_gates_with_dev(struct device_node *node,
+ const struct mtk_gate *clks,
+ int num, struct clk_onecell_data *clk_data,
+ struct device *dev);
+
struct mtk_clk_divider {
int id;
const char *name;