Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / clk / sprd / common.h
blob1d077b39cef6b1dffc86840b489eedbf9f130624
1 /* SPDX-License-Identifier: GPL-2.0 */
2 //
3 // Spreadtrum clock infrastructure
4 //
5 // Copyright (C) 2017 Spreadtrum, Inc.
6 // Author: Chunyan Zhang <chunyan.zhang@spreadtrum.com>
8 #ifndef _SPRD_CLK_COMMON_H_
9 #define _SPRD_CLK_COMMON_H_
11 #include <linux/clk-provider.h>
12 #include <linux/of_platform.h>
13 #include <linux/regmap.h>
15 struct device_node;
17 struct sprd_clk_common {
18 struct regmap *regmap;
19 u32 reg;
20 struct clk_hw hw;
23 struct sprd_clk_desc {
24 struct sprd_clk_common **clk_clks;
25 unsigned long num_clk_clks;
26 struct clk_hw_onecell_data *hw_clks;
29 static inline struct sprd_clk_common *
30 hw_to_sprd_clk_common(const struct clk_hw *hw)
32 return container_of(hw, struct sprd_clk_common, hw);
34 int sprd_clk_regmap_init(struct platform_device *pdev,
35 const struct sprd_clk_desc *desc);
36 int sprd_clk_probe(struct device *dev, struct clk_hw_onecell_data *clkhw);
38 #endif /* _SPRD_CLK_COMMON_H_ */