include/linux/soc/qcom/qmi.h
Source file repositories/reference/linux-study-clean/include/linux/soc/qcom/qmi.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/soc/qcom/qmi.h- Extension
.h- Size
- 8486 bytes
- Lines
- 285
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/completion.hlinux/idr.hlinux/list.hlinux/qrtr.hlinux/types.hlinux/workqueue.h
Detected Declarations
struct socketstruct qmi_headerstruct qmi_elem_infostruct qmi_response_type_v01struct qmi_servicestruct qmi_handlestruct qmi_opsstruct qmi_txnstruct qmi_msg_handlerstruct qmi_handleenum qmi_elem_typeenum qmi_array_type
Annotated Snippet
struct qmi_header {
u8 type;
__le16 txn_id;
__le16 msg_id;
__le16 msg_len;
} __packed;
#define QMI_REQUEST 0
#define QMI_RESPONSE 2
#define QMI_INDICATION 4
#define QMI_COMMON_TLV_TYPE 0
enum qmi_elem_type {
QMI_EOTI,
QMI_OPT_FLAG,
QMI_DATA_LEN,
QMI_UNSIGNED_1_BYTE,
QMI_UNSIGNED_2_BYTE,
QMI_UNSIGNED_4_BYTE,
QMI_UNSIGNED_8_BYTE,
QMI_SIGNED_2_BYTE_ENUM,
QMI_SIGNED_4_BYTE_ENUM,
QMI_STRUCT,
QMI_STRING,
};
enum qmi_array_type {
NO_ARRAY,
STATIC_ARRAY,
VAR_LEN_ARRAY,
};
/**
* struct qmi_elem_info - describes how to encode a single QMI element
* @data_type: Data type of this element.
* @elem_len: Array length of this element, if an array.
* @elem_size: Size of a single instance of this data type.
* @array_type: Array type of this element.
* @tlv_type: QMI message specific type to identify which element
* is present in an incoming message.
* @offset: Specifies the offset of the first instance of this
* element in the data structure.
* @ei_array: Null-terminated array of @qmi_elem_info to describe nested
* structures.
*/
struct qmi_elem_info {
enum qmi_elem_type data_type;
u32 elem_len;
u32 elem_size;
enum qmi_array_type array_type;
u8 tlv_type;
u32 offset;
const struct qmi_elem_info *ei_array;
};
#define QMI_RESULT_SUCCESS_V01 0
#define QMI_RESULT_FAILURE_V01 1
#define QMI_ERR_NONE_V01 0
#define QMI_ERR_MALFORMED_MSG_V01 1
#define QMI_ERR_NO_MEMORY_V01 2
#define QMI_ERR_INTERNAL_V01 3
#define QMI_ERR_CLIENT_IDS_EXHAUSTED_V01 5
#define QMI_ERR_INVALID_ID_V01 41
#define QMI_ERR_ENCODING_V01 58
#define QMI_ERR_DISABLED_V01 69
#define QMI_ERR_INCOMPATIBLE_STATE_V01 90
#define QMI_ERR_NOT_SUPPORTED_V01 94
/*
* Enumerate the IDs of the QMI services
*/
#define QMI_SERVICE_ID_TEST 0x0f /* 15 */
#define QMI_SERVICE_ID_SSCTL 0x2b /* 43 */
#define QMI_SERVICE_ID_IPA 0x31 /* 49 */
#define QMI_SERVICE_ID_SERVREG_LOC 0x40 /* 64 */
#define QMI_SERVICE_ID_SERVREG_NOTIF 0x42 /* 66 */
#define QMI_SERVICE_ID_WLFW 0x45 /* 69 */
#define QMI_SERVICE_ID_SLIMBUS 0x301 /* 769 */
#define QMI_SERVICE_ID_USB_AUDIO_STREAM 0x41d /* 1053 */
/**
* struct qmi_response_type_v01 - common response header (decoded)
* @result: result of the transaction
* @error: error value, when @result is QMI_RESULT_FAILURE_V01
*/
struct qmi_response_type_v01 {
u16 result;
u16 error;
Annotation
- Immediate include surface: `linux/completion.h`, `linux/idr.h`, `linux/list.h`, `linux/qrtr.h`, `linux/types.h`, `linux/workqueue.h`.
- Detected declarations: `struct socket`, `struct qmi_header`, `struct qmi_elem_info`, `struct qmi_response_type_v01`, `struct qmi_service`, `struct qmi_handle`, `struct qmi_ops`, `struct qmi_txn`, `struct qmi_msg_handler`, `struct qmi_handle`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.