scmi_agent-uclass.h 976 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2019-2020 Linaro Limited.
  4. */
  5. #ifndef _SCMI_AGENT_UCLASS_H
  6. #define _SCMI_AGENT_UCLASS_H
  7. struct udevice;
  8. struct scmi_msg;
  9. struct scmi_channel;
  10. /**
  11. * struct scmi_transport_ops - The functions that a SCMI transport layer must implement.
  12. */
  13. struct scmi_agent_ops {
  14. /*
  15. * of_get_channel - Get SCMI channel from SCMI agent device tree node
  16. *
  17. * @dev: SCMI protocol device using the transport
  18. * @channel: Output reference to SCMI channel upon success
  19. * Return 0 upon success and a negative errno on failure
  20. */
  21. int (*of_get_channel)(struct udevice *dev, struct scmi_channel **channel);
  22. /*
  23. * process_msg - Request transport to get the SCMI message processed
  24. *
  25. * @dev: SCMI protocol device using the transport
  26. * @msg: SCMI message to be transmitted
  27. */
  28. int (*process_msg)(struct udevice *dev, struct scmi_channel *channel,
  29. struct scmi_msg *msg);
  30. };
  31. #endif /* _SCMI_TRANSPORT_UCLASS_H */