qcom_aoss.h 654 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef __QCOM_AOSS_H__
  6. #define __QCOM_AOSS_H__
  7. #include <linux/err.h>
  8. #include <linux/device.h>
  9. struct qmp;
  10. #if IS_ENABLED(CONFIG_QCOM_AOSS_QMP)
  11. int qmp_send(struct qmp *qmp, const void *data, size_t len);
  12. struct qmp *qmp_get(struct device *dev);
  13. void qmp_put(struct qmp *qmp);
  14. #else
  15. static inline int qmp_send(struct qmp *qmp, const void *data, size_t len)
  16. {
  17. return -ENODEV;
  18. }
  19. static inline struct qmp *qmp_get(struct device *dev)
  20. {
  21. return ERR_PTR(-ENODEV);
  22. }
  23. static inline void qmp_put(struct qmp *qmp)
  24. {
  25. }
  26. #endif
  27. #endif