bolero-clk-rsc.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2019, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef BOLERO_CLK_RSC_H
  6. #define BOLERO_CLK_RSC_H
  7. #include <linux/regmap.h>
  8. #include <dt-bindings/sound/qcom,bolero-clk-rsc.h>
  9. #if IS_ENABLED(CONFIG_SND_SOC_BOLERO)
  10. int bolero_clk_rsc_mgr_init(void);
  11. void bolero_clk_rsc_mgr_exit(void);
  12. void bolero_clk_rsc_fs_gen_request(struct device *dev,
  13. bool enable);
  14. int bolero_clk_rsc_request_clock(struct device *dev,
  15. int default_clk_id,
  16. int clk_id_req,
  17. bool enable);
  18. int bolero_rsc_clk_reset(struct device *dev, int clk_id);
  19. #else
  20. static inline void bolero_clk_rsc_fs_gen_request(struct device *dev,
  21. bool enable)
  22. {
  23. }
  24. static inline int bolero_clk_rsc_mgr_init(void)
  25. {
  26. return 0;
  27. }
  28. static inline void bolero_clk_rsc_mgr_exit(void)
  29. {
  30. }
  31. static inline int bolero_clk_rsc_request_clock(struct device *dev,
  32. int default_clk_id,
  33. int clk_id_req,
  34. bool enable)
  35. {
  36. return 0;
  37. }
  38. static inline int bolero_rsc_clk_reset(struct device *dev, int clk_id)
  39. {
  40. return 0;
  41. }
  42. #endif /* CONFIG_SND_SOC_BOLERO */
  43. #endif /* BOLERO_CLK_RSC_H */