common.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  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. struct platform_device;
  16. struct regmap_config;
  17. struct clk_regmap;
  18. struct qcom_reset_map;
  19. struct regmap;
  20. struct freq_tbl;
  21. struct qcom_cc_desc {
  22. const struct regmap_config *config;
  23. struct clk_regmap **clks;
  24. size_t num_clks;
  25. const struct qcom_reset_map *resets;
  26. size_t num_resets;
  27. };
  28. extern const struct freq_tbl *qcom_find_freq(const struct freq_tbl *f,
  29. unsigned long rate);
  30. extern struct regmap *qcom_cc_map(struct platform_device *pdev,
  31. const struct qcom_cc_desc *desc);
  32. extern int qcom_cc_really_probe(struct platform_device *pdev,
  33. const struct qcom_cc_desc *desc,
  34. struct regmap *regmap);
  35. extern int qcom_cc_probe(struct platform_device *pdev,
  36. const struct qcom_cc_desc *desc);
  37. extern void qcom_cc_remove(struct platform_device *pdev);
  38. #endif