]>
Commit | Line | Data |
---|---|---|
358599ef EC |
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 | ||
8 | struct udevice; | |
9 | struct scmi_msg; | |
85dc5828 | 10 | struct scmi_channel; |
358599ef EC |
11 | |
12 | /** | |
13 | * struct scmi_transport_ops - The functions that a SCMI transport layer must implement. | |
14 | */ | |
15 | struct scmi_agent_ops { | |
8e96801a EC |
16 | /* |
17 | * of_get_channel - Get SCMI channel from SCMI agent device tree node | |
18 | * | |
19 | * @dev: SCMI protocol device using the transport | |
20 | * @channel: Output reference to SCMI channel upon success | |
21 | * Return 0 upon success and a negative errno on failure | |
22 | */ | |
23 | int (*of_get_channel)(struct udevice *dev, struct scmi_channel **channel); | |
24 | ||
358599ef EC |
25 | /* |
26 | * process_msg - Request transport to get the SCMI message processed | |
27 | * | |
8bcb1b48 | 28 | * @dev: SCMI protocol device using the transport |
358599ef EC |
29 | * @msg: SCMI message to be transmitted |
30 | */ | |
85dc5828 EC |
31 | int (*process_msg)(struct udevice *dev, struct scmi_channel *channel, |
32 | struct scmi_msg *msg); | |
358599ef EC |
33 | }; |
34 | ||
35 | #endif /* _SCMI_TRANSPORT_UCLASS_H */ |