summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/scmi_agent-uclass.h15
-rw-r--r--include/scmi_agent.h14
2 files changed, 28 insertions, 1 deletions
diff --git a/include/scmi_agent-uclass.h b/include/scmi_agent-uclass.h
index eee46c880a5..258aa0f3759 100644
--- a/include/scmi_agent-uclass.h
+++ b/include/scmi_agent-uclass.h
@@ -5,11 +5,24 @@
#ifndef _SCMI_AGENT_UCLASS_H
#define _SCMI_AGENT_UCLASS_H
-struct udevice;
+#include <dm/device.h>
+
struct scmi_msg;
struct scmi_channel;
/**
+ * struct scmi_agent_priv - private data maintained by agent instance
+ * @clock_dev: SCMI clock protocol device
+ * @resetdom_dev: SCMI reset domain protocol device
+ * @voltagedom_dev: SCMI voltage domain protocol device
+ */
+struct scmi_agent_priv {
+ struct udevice *clock_dev;
+ struct udevice *resetdom_dev;
+ struct udevice *voltagedom_dev;
+};
+
+/**
* struct scmi_transport_ops - The functions that a SCMI transport layer must implement.
*/
struct scmi_agent_ops {
diff --git a/include/scmi_agent.h b/include/scmi_agent.h
index 577892029ff..755986d6c42 100644
--- a/include/scmi_agent.h
+++ b/include/scmi_agent.h
@@ -10,6 +10,7 @@
#ifndef SCMI_AGENT_H
#define SCMI_AGENT_H
+#include <scmi_protocols.h>
#include <asm/types.h>
struct udevice;
@@ -75,6 +76,19 @@ int devm_scmi_of_get_channel(struct udevice *dev);
int devm_scmi_process_msg(struct udevice *dev, struct scmi_msg *msg);
/**
+ * scmi_get_protocol() - get protocol instance
+ *
+ * @dev: SCMI agent device
+ * @id: SCMI protocol ID
+ *
+ * Obtain the device instance for given protocol ID, @id.
+ *
+ * Return: Pointer to the device if found, null otherwise
+ */
+struct udevice *scmi_get_protocol(struct udevice *dev,
+ enum scmi_std_protocol id);
+
+/**
* scmi_to_linux_errno() - Convert an SCMI error code into a Linux errno code
*
* @scmi_errno: SCMI error code value