qcom.h 1008 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  5. */
  6. #ifndef __LINUX_CLK_QCOM_H_
  7. #define __LINUX_CLK_QCOM_H_
  8. #include <linux/clk.h>
  9. #include <linux/regulator/consumer.h>
  10. #include <soc/qcom/crm.h>
  11. enum branch_mem_flags {
  12. CLKFLAG_RETAIN_PERIPH,
  13. CLKFLAG_NORETAIN_PERIPH,
  14. CLKFLAG_RETAIN_MEM,
  15. CLKFLAG_NORETAIN_MEM,
  16. CLKFLAG_PERIPH_OFF_SET,
  17. CLKFLAG_PERIPH_OFF_CLEAR,
  18. };
  19. int qcom_clk_get_voltage(struct clk *clk, unsigned long rate);
  20. int qcom_clk_set_flags(struct clk *clk, unsigned long flags);
  21. void qcom_clk_dump(struct clk *clk, struct regulator *regulator,
  22. bool calltrace);
  23. void qcom_clk_bulk_dump(int num_clks, struct clk_bulk_data *clks,
  24. struct regulator *regulator, bool calltrace);
  25. int qcom_clk_crm_set_rate(struct clk *clk,
  26. enum crm_drv_type client_type, u32 client_idx,
  27. u32 pwr_st, unsigned long rate);
  28. #endif /* __LINUX_CLK_QCOM_H_ */