wcd_cmi_api.h 706 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2014, The Linux Foundation. All rights reserved.
  3. */
  4. #ifndef __CMI_API__
  5. #define __CMI_API__
  6. enum cmi_api_result {
  7. CMI_API_FAILED = 1,
  8. CMI_API_BUSY,
  9. CMI_API_NO_MEMORY,
  10. CMI_API_NOT_READY,
  11. };
  12. enum cmi_api_event {
  13. CMI_API_MSG = 1,
  14. CMI_API_OFFLINE,
  15. CMI_API_ONLINE,
  16. CMI_API_DEINITIALIZED,
  17. };
  18. struct cmi_api_notification {
  19. enum cmi_api_event event;
  20. enum cmi_api_result result;
  21. void *message;
  22. };
  23. void *cmi_register(
  24. void notification_callback
  25. (const struct cmi_api_notification *parameter),
  26. u32 service);
  27. enum cmi_api_result cmi_deregister(void *reg_handle);
  28. enum cmi_api_result cmi_send_msg(void *message);
  29. #endif /*__CMI_API__*/