1 // SPDX-License-Identifier: GPL-2.0+
3 // OWL common clock driver
5 // Copyright (c) 2014 Actions Semi Inc.
6 // Author: David Liu <liuwei@actions-semi.com>
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/of_platform.h>
16 #include <linux/regmap.h>
20 struct owl_clk_common
{
21 struct regmap
*regmap
;
26 struct owl_clk_common
**clks
;
27 unsigned long num_clks
;
28 struct clk_hw_onecell_data
*hw_clks
;
31 static inline struct owl_clk_common
*
32 hw_to_owl_clk_common(const struct clk_hw
*hw
)
34 return container_of(hw
, struct owl_clk_common
, hw
);
37 int owl_clk_regmap_init(struct platform_device
*pdev
,
38 const struct owl_clk_desc
*desc
);
39 int owl_clk_probe(struct device
*dev
, struct clk_hw_onecell_data
*hw_clks
);
41 #endif /* _OWL_COMMON_H_ */