dp_pll.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef __MDSS_DP_PLL_H
  6. #define __MDSS_DP_PLL_H
  7. struct dp_pll_vco_clk {
  8. struct clk_hw hw;
  9. unsigned long rate; /* current vco rate */
  10. u64 min_rate; /* min vco rate */
  11. u64 max_rate; /* max vco rate */
  12. void *priv;
  13. };
  14. static inline struct dp_pll_vco_clk *to_dp_vco_hw(struct clk_hw *hw)
  15. {
  16. return container_of(hw, struct dp_pll_vco_clk, hw);
  17. }
  18. #ifdef CONFIG_QCOM_MDSS_DP_PLL
  19. int dp_pll_clock_register_14nm(struct platform_device *pdev,
  20. struct mdss_pll_resources *pll_res);
  21. int dp_pll_clock_register_10nm(struct platform_device *pdev,
  22. struct mdss_pll_resources *pll_res);
  23. int dp_pll_clock_register_7nm(struct platform_device *pdev,
  24. struct mdss_pll_resources *pll_res);
  25. #else
  26. static inline int dp_pll_clock_register_14nm(struct platform_device *pdev,
  27. struct mdss_pll_resources *pll_res)
  28. {
  29. return 0;
  30. }
  31. static inline int dp_pll_clock_register_10nm(struct platform_device *pdev,
  32. struct mdss_pll_resources *pll_res)
  33. {
  34. return 0;
  35. }
  36. static inline int dp_pll_clock_register_7nm(struct platform_device *pdev,
  37. struct mdss_pll_resources *pll_res)
  38. {
  39. return 0;
  40. }
  41. #endif
  42. #endif /* __MDSS_DP_PLL_H */