0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef _OWL_COMMON_H_
0012 #define _OWL_COMMON_H_
0013
0014 #include <linux/clk-provider.h>
0015 #include <linux/of_platform.h>
0016 #include <linux/regmap.h>
0017
0018 struct device_node;
0019
0020 struct owl_clk_common {
0021 struct regmap *regmap;
0022 struct clk_hw hw;
0023 };
0024
0025 struct owl_clk_desc {
0026 struct owl_clk_common **clks;
0027 unsigned long num_clks;
0028 struct clk_hw_onecell_data *hw_clks;
0029 const struct owl_reset_map *resets;
0030 unsigned long num_resets;
0031 struct regmap *regmap;
0032 };
0033
0034 static inline struct owl_clk_common *
0035 hw_to_owl_clk_common(const struct clk_hw *hw)
0036 {
0037 return container_of(hw, struct owl_clk_common, hw);
0038 }
0039
0040 int owl_clk_regmap_init(struct platform_device *pdev,
0041 struct owl_clk_desc *desc);
0042 int owl_clk_probe(struct device *dev, struct clk_hw_onecell_data *hw_clks);
0043
0044 #endif