smci_opener.h 875 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0-only
  2. *
  3. * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #ifndef __SMCI_OPENER_H
  6. #define __SMCI_OPENER_H
  7. #include "smci_object.h"
  8. #include "IOpener.h"
  9. /** 0 is not a valid service ID. */
  10. #define SMCI_OPENER_INVALID_ID UINT32_C(0)
  11. #define SMCI_OPENER_ERROR_NOT_FOUND INT32_C(10)
  12. #define SMCI_OPENER_ERROR_PRIVILEGE INT32_C(11)
  13. #define SMCI_OPENER_ERROR_NOT_SUPPORTED INT32_C(12)
  14. #define SMCI_OPENER_OP_OPEN 0
  15. static inline int32_t
  16. smci_opener_release(struct smci_object self)
  17. {
  18. return IOpener_release(self);
  19. }
  20. static inline int32_t
  21. smci_opener_retain(struct smci_object self)
  22. {
  23. return IOpener_retain(self);
  24. }
  25. static inline int32_t
  26. smci_opener_open(struct smci_object self, uint32_t id_val, struct smci_object *obj_ptr)
  27. {
  28. return IOpener_open(self, id_val, obj_ptr);
  29. }
  30. #endif /* __SMCI_OPENER_H */