bolero-clk-rsc.h 969 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. #else
  19. static inline void bolero_clk_rsc_fs_gen_request(struct device *dev,
  20. bool enable)
  21. {
  22. }
  23. static inline int bolero_clk_rsc_mgr_init(void)
  24. {
  25. return 0;
  26. }
  27. static inline void bolero_clk_rsc_mgr_exit(void)
  28. {
  29. }
  30. static inline int bolero_clk_rsc_request_clock(struct device *dev,
  31. int default_clk_id,
  32. int clk_id_req,
  33. bool enable)
  34. {
  35. return 0;
  36. }
  37. #endif /* CONFIG_SND_SOC_BOLERO */
  38. #endif /* BOLERO_CLK_RSC_H */