i915_gsc_proxy_mei_interface.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* SPDX-License-Identifier: MIT */
  2. /*
  3. * Copyright (c) 2022-2023 Intel Corporation
  4. */
  5. #ifndef _I915_GSC_PROXY_MEI_INTERFACE_H_
  6. #define _I915_GSC_PROXY_MEI_INTERFACE_H_
  7. #include <linux/types.h>
  8. struct device;
  9. struct module;
  10. /**
  11. * struct i915_gsc_proxy_component_ops - ops for GSC Proxy services.
  12. * @owner: Module providing the ops
  13. * @send: sends a proxy message from GSC FW to ME FW
  14. * @recv: receives a proxy message for GSC FW from ME FW
  15. */
  16. struct i915_gsc_proxy_component_ops {
  17. struct module *owner;
  18. /**
  19. * @send: Sends a proxy message to ME FW.
  20. * @dev: device struct corresponding to the mei device
  21. * @buf: message buffer to send
  22. * @size: size of the message
  23. * Return: bytes sent on success, negative errno value on failure
  24. */
  25. int (*send)(struct device *dev, const void *buf, size_t size);
  26. /**
  27. * @recv: Receives a proxy message from ME FW.
  28. * @dev: device struct corresponding to the mei device
  29. * @buf: message buffer to contain the received message
  30. * @size: size of the buffer
  31. * Return: bytes received on success, negative errno value on failure
  32. */
  33. int (*recv)(struct device *dev, void *buf, size_t size);
  34. };
  35. /**
  36. * struct i915_gsc_proxy_component - Used for communication between i915 and
  37. * MEI drivers for GSC proxy services
  38. * @mei_dev: device that provide the GSC proxy service.
  39. * @ops: Ops implemented by GSC proxy driver, used by i915 driver.
  40. */
  41. struct i915_gsc_proxy_component {
  42. struct device *mei_dev;
  43. const struct i915_gsc_proxy_component_ops *ops;
  44. };
  45. #endif /* _I915_GSC_PROXY_MEI_INTERFACE_H_ */