scmi_plh.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * SCMI Vendor Protocols header
  4. *
  5. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
  6. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  7. */
  8. #ifndef _SCMI_PLH_VENDOR_H
  9. #define _SCMI_PLH_VENDOR_H
  10. #include <linux/bitfield.h>
  11. #include <linux/device.h>
  12. #include <linux/types.h>
  13. #define SCMI_PROTOCOL_PLH 0x81
  14. enum plh_features {
  15. PERF_LOCK_SCROLL,
  16. PERF_LOCK_LAUNCH,
  17. };
  18. struct scmi_protocol_handle;
  19. extern struct scmi_device *get_plh_scmi_device(void);
  20. /**
  21. * struct scmi_plh_vendor_ops - represents the various operations provided
  22. * by SCMI PLH Protocol
  23. *
  24. * @init_plh_ipc_freq_tbl: initialize plh ipc freq voting table in cpucp
  25. * @start_plh: starts plh in cpucp
  26. * @stop_plh: stops plh in cpucp
  27. * @set_plh_sample_ms: configure the sampling duration of plh in cpucp
  28. * @set_plh_log_level: configure the supported log_level of plh in cpucp
  29. */
  30. struct scmi_plh_vendor_ops {
  31. int (*init_plh_ipc_freq_tbl)(const struct scmi_protocol_handle *ph,
  32. u16 *p_init_args, u16 init_len, enum plh_features feature);
  33. int (*start_plh)(const struct scmi_protocol_handle *ph, u16 fps, enum plh_features feature);
  34. int (*stop_plh)(const struct scmi_protocol_handle *ph, enum plh_features feature);
  35. int (*set_plh_sample_ms)(const struct scmi_protocol_handle *ph,
  36. u16 sample_ms, enum plh_features feature);
  37. int (*set_plh_log_level)(const struct scmi_protocol_handle *ph,
  38. u16 log_level, enum plh_features feature);
  39. };
  40. #endif