scmi_c1dcvs.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * scmi c1dcvs protocols header
  4. *
  5. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  6. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  7. */
  8. #ifndef _SCMI_C1DCVS_H
  9. #define _SCMI_C1DCVS_H
  10. #include <linux/bitfield.h>
  11. #include <linux/device.h>
  12. #include <linux/types.h>
  13. #define SCMI_C1DCVS_PROTOCOL 0x87
  14. struct scmi_protocol_handle;
  15. /**
  16. * struct scmi_c1dcvs_vendor_ops - represents the various operations provided
  17. * by scmi c1dcvs protocol
  18. */
  19. struct scmi_c1dcvs_vendor_ops {
  20. int (*set_enable_c1dcvs)(const struct scmi_protocol_handle *ph, void *buf);
  21. int (*get_enable_c1dcvs)(const struct scmi_protocol_handle *ph, void *buf);
  22. int (*set_enable_trace)(const struct scmi_protocol_handle *ph, void *buf);
  23. int (*get_enable_trace)(const struct scmi_protocol_handle *ph, void *buf);
  24. int (*set_ipc_thresh)(const struct scmi_protocol_handle *ph, void *buf);
  25. int (*get_ipc_thresh)(const struct scmi_protocol_handle *ph, void *buf);
  26. int (*set_efreq_thresh)(const struct scmi_protocol_handle *ph, void *buf);
  27. int (*get_efreq_thresh)(const struct scmi_protocol_handle *ph, void *buf);
  28. int (*set_hysteresis)(const struct scmi_protocol_handle *ph, void *buf);
  29. int (*get_hysteresis)(const struct scmi_protocol_handle *ph, void *buf);
  30. };
  31. #if IS_ENABLED(CONFIG_QTI_C1DCVS_SCMI_CLIENT)
  32. int c1dcvs_enable(bool enable);
  33. #else
  34. static inline int c1dcvs_enable(bool enable)
  35. {
  36. return -ENODEV;
  37. }
  38. #endif
  39. #endif /* _SCMI_C1DCVS_H */