]>
Commit | Line | Data |
---|---|---|
aa4f886f SH |
1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | |
3 | * SCMI Message Protocol driver header | |
4 | * | |
5 | * Copyright (C) 2018 ARM Ltd. | |
6 | */ | |
7 | #include <linux/types.h> | |
8 | ||
b6f20ff8 SH |
9 | #define SCMI_MAX_STR_SIZE 16 |
10 | ||
11 | /** | |
12 | * struct scmi_revision_info - version information structure | |
13 | * | |
14 | * @major_ver: Major ABI version. Change here implies risk of backward | |
15 | * compatibility break. | |
16 | * @minor_ver: Minor ABI version. Change here implies new feature addition, | |
17 | * or compatible change in ABI. | |
18 | * @num_protocols: Number of protocols that are implemented, excluding the | |
19 | * base protocol. | |
20 | * @num_agents: Number of agents in the system. | |
21 | * @impl_ver: A vendor-specific implementation version. | |
22 | * @vendor_id: A vendor identifier(Null terminated ASCII string) | |
23 | * @sub_vendor_id: A sub-vendor identifier(Null terminated ASCII string) | |
24 | */ | |
25 | struct scmi_revision_info { | |
26 | u16 major_ver; | |
27 | u16 minor_ver; | |
28 | u8 num_protocols; | |
29 | u8 num_agents; | |
30 | u32 impl_ver; | |
31 | char vendor_id[SCMI_MAX_STR_SIZE]; | |
32 | char sub_vendor_id[SCMI_MAX_STR_SIZE]; | |
33 | }; | |
34 | ||
aa4f886f SH |
35 | /** |
36 | * struct scmi_handle - Handle returned to ARM SCMI clients for usage. | |
37 | * | |
38 | * @dev: pointer to the SCMI device | |
b6f20ff8 | 39 | * @version: pointer to the structure containing SCMI version information |
aa4f886f SH |
40 | */ |
41 | struct scmi_handle { | |
42 | struct device *dev; | |
b6f20ff8 SH |
43 | struct scmi_revision_info *version; |
44 | }; | |
45 | ||
46 | enum scmi_std_protocol { | |
47 | SCMI_PROTOCOL_BASE = 0x10, | |
48 | SCMI_PROTOCOL_POWER = 0x11, | |
49 | SCMI_PROTOCOL_SYSTEM = 0x12, | |
50 | SCMI_PROTOCOL_PERF = 0x13, | |
51 | SCMI_PROTOCOL_CLOCK = 0x14, | |
52 | SCMI_PROTOCOL_SENSOR = 0x15, | |
aa4f886f | 53 | }; |