xref: /linux-6.15/include/uapi/linux/stm.h (revision 9ea393d8)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /*
3  * System Trace Module (STM) userspace interfaces
4  * Copyright (c) 2014, Intel Corporation.
5  *
6  * STM class implements generic infrastructure for  System Trace Module devices
7  * as defined in MIPI STPv2 specification.
8  */
9 
10 #ifndef _UAPI_LINUX_STM_H
11 #define _UAPI_LINUX_STM_H
12 
13 #include <linux/types.h>
14 
15 /**
16  * struct stp_policy_id - identification for the STP policy
17  * @size:	size of the structure including real id[] length
18  * @master:	assigned master
19  * @channel:	first assigned channel
20  * @width:	number of requested channels
21  * @id:		identification string
22  *
23  * User must calculate the total size of the structure and put it into
24  * @size field, fill out the @id and desired @width. In return, kernel
25  * fills out @master, @channel and @width.
26  */
27 struct stp_policy_id {
28 	__u32		size;
29 	__u16		master;
30 	__u16		channel;
31 	__u16		width;
32 	/* padding */
33 	__u16		__reserved_0;
34 	__u32		__reserved_1;
35 	char		id[0];
36 };
37 
38 #define STP_POLICY_ID_SET	_IOWR('%', 0, struct stp_policy_id)
39 #define STP_POLICY_ID_GET	_IOR('%', 1, struct stp_policy_id)
40 #define STP_SET_OPTIONS		_IOW('%', 2, __u64)
41 
42 #endif /* _UAPI_LINUX_STM_H */
43