blob: f519322acdf3be21d4ada6d014a517b459f956a6 [file] [log] [blame]
Stephen Boyd49fc8252014-03-21 17:59:37 -07001/*
2 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
3 *
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13#ifndef __QCOM_CLK_COMMON_H__
14#define __QCOM_CLK_COMMON_H__
15
16struct platform_device;
17struct regmap_config;
18struct clk_regmap;
19struct qcom_reset_map;
Stephen Boyd5b6b7492014-07-15 14:59:21 -070020struct regmap;
Stephen Boyd50c6a502014-09-04 13:21:50 -070021struct freq_tbl;
Stephen Boyd49fc8252014-03-21 17:59:37 -070022
23struct qcom_cc_desc {
24 const struct regmap_config *config;
25 struct clk_regmap **clks;
26 size_t num_clks;
27 const struct qcom_reset_map *resets;
28 size_t num_resets;
29};
30
Stephen Boyd50c6a502014-09-04 13:21:50 -070031extern const struct freq_tbl *qcom_find_freq(const struct freq_tbl *f,
32 unsigned long rate);
33
Stephen Boyd5b6b7492014-07-15 14:59:21 -070034extern struct regmap *qcom_cc_map(struct platform_device *pdev,
35 const struct qcom_cc_desc *desc);
36extern int qcom_cc_really_probe(struct platform_device *pdev,
37 const struct qcom_cc_desc *desc,
38 struct regmap *regmap);
Stephen Boyd49fc8252014-03-21 17:59:37 -070039extern int qcom_cc_probe(struct platform_device *pdev,
40 const struct qcom_cc_desc *desc);
41
42extern void qcom_cc_remove(struct platform_device *pdev);
43
44#endif