i915_pxp_tee_interface.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: MIT */
  2. /*
  3. * Copyright © 2020 Intel Corporation
  4. */
  5. #ifndef _I915_PXP_TEE_INTERFACE_H_
  6. #define _I915_PXP_TEE_INTERFACE_H_
  7. #include <linux/mutex.h>
  8. #include <linux/device.h>
  9. /**
  10. * struct i915_pxp_component_ops - ops for PXP services.
  11. * @owner: Module providing the ops
  12. * @send: sends data to PXP
  13. * @receive: receives data from PXP
  14. */
  15. struct i915_pxp_component_ops {
  16. /**
  17. * @owner: owner of the module provding the ops
  18. */
  19. struct module *owner;
  20. int (*send)(struct device *dev, const void *message, size_t size);
  21. int (*recv)(struct device *dev, void *buffer, size_t size);
  22. };
  23. /**
  24. * struct i915_pxp_component - Used for communication between i915 and TEE
  25. * drivers for the PXP services
  26. * @tee_dev: device that provide the PXP service from TEE Bus.
  27. * @pxp_ops: Ops implemented by TEE driver, used by i915 driver.
  28. */
  29. struct i915_pxp_component {
  30. struct device *tee_dev;
  31. const struct i915_pxp_component_ops *ops;
  32. /* To protect the above members. */
  33. struct mutex mutex;
  34. };
  35. #endif /* _I915_TEE_PXP_INTERFACE_H_ */