Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / clk / actions / owl-common.h
blob8fb65f3e82d797fb2aa9a2cbcf1cf562f45705ac
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 //
3 // OWL common clock driver
4 //
5 // Copyright (c) 2014 Actions Semi Inc.
6 // Author: David Liu <liuwei@actions-semi.com>
7 //
8 // Copyright (c) 2018 Linaro Ltd.
9 // Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
11 #ifndef _OWL_COMMON_H_
12 #define _OWL_COMMON_H_
14 #include <linux/clk-provider.h>
15 #include <linux/regmap.h>
17 struct device_node;
18 struct platform_device;
20 struct owl_clk_common {
21 struct regmap *regmap;
22 struct clk_hw hw;
25 struct owl_clk_desc {
26 struct owl_clk_common **clks;
27 unsigned long num_clks;
28 struct clk_hw_onecell_data *hw_clks;
29 const struct owl_reset_map *resets;
30 unsigned long num_resets;
31 struct regmap *regmap;
34 static inline struct owl_clk_common *
35 hw_to_owl_clk_common(const struct clk_hw *hw)
37 return container_of(hw, struct owl_clk_common, hw);
40 int owl_clk_regmap_init(struct platform_device *pdev,
41 struct owl_clk_desc *desc);
42 int owl_clk_probe(struct device *dev, struct clk_hw_onecell_data *hw_clks);
44 #endif /* _OWL_COMMON_H_ */