Convert CONFIG_SYS_INTERLAKEN et al to Kconfig
[platform/kernel/u-boot.git] / include / scmi_agent.h
index 18bcd48..ee62863 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/types.h>
 
 struct udevice;
+struct scmi_channel;
 
 /*
  * struct scmi_msg - Context of a SCMI message sent and the response received
@@ -45,6 +46,15 @@ struct scmi_msg {
        }
 
 /**
+ * devm_scmi_of_get_channel() - Get SCMI channel handle from SCMI agent DT node
+ *
+ * @dev:       Device requesting a channel
+ * @channel:   Output reference to the SCMI channel upon success
+ * @return 0 on success and a negative errno on failure
+ */
+int devm_scmi_of_get_channel(struct udevice *dev, struct scmi_channel **channel);
+
+/**
  * devm_scmi_process_msg() - Send and process an SCMI message
  *
  * Send a message to an SCMI server through a target SCMI agent device.
@@ -52,10 +62,12 @@ struct scmi_msg {
  * On return, scmi_msg::out_msg_sz stores the response payload size.
  *
  * @dev:       SCMI device
+ * @channel:   Communication channel for the device
  * @msg:       Message structure reference
  * Return: 0 on success and a negative errno on failure
  */
-int devm_scmi_process_msg(struct udevice *dev, struct scmi_msg *msg);
+int devm_scmi_process_msg(struct udevice *dev, struct scmi_channel *channel,
+                         struct scmi_msg *msg);
 
 /**
  * scmi_to_linux_errno() - Convert an SCMI error code into a Linux errno code