Text of docs.kernel.org › driver-api › surface_aggregator › client-api.html as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Client Driver API Documentation — The Linux Kernel documentation

The Linux Kernel 7.4.0-rc3 Quick search Contents Working with the development community Development process Submitting patches Code of conduct Maintainer handbook All development-process docs Internal API manuals Core API Driver APIs General information for driver authors Useful support libraries Bus-level documentation Subsystem-specific APIs Linux 802.11 Driver Developer’s Guide ACPI Support Kernel driver lp855x The Common Clk Framework Confidential Computing Console Drivers Crypto Drivers DMAEngine documentation The Linux kernel dpll subsystem Error Detection And Correction (EDAC) Devices Extcon Device Subsystem Linux Firmware API FPGA Subsystem Frame Buffer Library Managing Ownership of the Framebuffer Aperture Generic Counter Interface Generic Radix Page Table General Purpose Input/Output (GPIO) High Speed Synchronous Serial Interface (HSI) The Linux Hardware Timestamping Engine (HTE) Recoverable Hardware Error Tracking in vmcoreinfo I 2 C and SMBus Subsystem Industrial I/O InfiniBand and Remote DMA (RDMA) Interfaces Input Subsystem Generic System Interconnect Subsystem IPMB Driver for a Satellite MC The Linux IPMI Driver The Intel Silicon Security Engine Interface (Intel SSEI) libATA Developer’s Guide The Common Mailbox Framework RAID Media subsystem kernel internal API Intel(R) Management Engine Interface (Intel(R) MEI) Memory Controller drivers Message-based devices Miscellaneous Devices Parallel Port Devices 16x50 UART Driver Pulse-Width Modulation (PWM) MMC/SD/SDIO card support Memory Technology Device (MTD) MTD NAND Driver Programming Interface Near Field Communication NTB Drivers Non-Volatile Memory Device (NVDIMM) NVMEM Subsystem PARPORT interface documentation Generic PHY Framework PINCTRL (PIN CONTROL) subsystem PLDM Firmware Flash Update Library PPS - Pulse Per Second PTP hardware clock infrastructure for Linux Pulse Width Modulation (PWM) interface Power Sequencing API Voltage and current regulator API Reset controller API rfkill - RF kill switch support Writing s390 channel device drivers SCSI Interfaces Guide Support for Serial devices SM501 Driver SoundWire Documentation Serial Peripheral Interface (SPI) Steal Governor Introduction Core idea Workload considerations Module Parameters Reasons for CONFIG_STEAL_GOVERNOR=m Surface System Aggregator Module (SSAM) Linux Switchtec Support Sync File API Guide target and iSCSI Interfaces Guide TEE (Trusted Execution Environment) driver API Thermal TTY WBRF - Wifi Band RFI Mitigations WMI Driver API Xilinx FPGA Writing Device Drivers for Zorro Devices Subsystems Locking Development tools and processes Licensing rules Writing documentation Development tools Testing guide Hacking guide Tracing Fault injection Livepatching Rust User-oriented documentation Administration Build system Reporting issues Userspace tools Userspace API Firmware-related documentation Firmware Firmware and Devicetree Architecture-specific documentation CPU architectures Other documentation Unsorted documentation Translations Translations This Page Show Source Client Driver API Documentation ¶ Serial Hub Communication ¶ enum ssh_frame_type ¶ Frame types for SSH frames.

Constants SSH_FRAME_TYPE_DATA_SEQ Indicates a data frame, followed by a payload with the length specified in the struct ssh_frame.len field. This frame is sequenced, meaning that an ACK is required. SSH_FRAME_TYPE_DATA_NSQ Same as SSH_FRAME_TYPE_DATA_SEQ , but unsequenced, meaning that the message does not have to be ACKed. SSH_FRAME_TYPE_ACK Indicates an ACK message. SSH_FRAME_TYPE_NAK Indicates an error response for previously sent frame.

In general, this means that the frame and/or payload is malformed, e.g. a CRC is wrong. For command-type payloads, this can also mean that the command is invalid. struct ssh_frame ¶ SSH communication frame. Definition : struct ssh_frame { u8 type; __le16 len; u8 seq; }; Members type The type of the frame. See enum ssh_frame_type . len The length of the frame payload directly following the CRC for this frame. Does not include the final CRC for that payload. seq The sequence number for this message/exchange. enum ssh_payload_type ¶ Type indicator for the SSH payload.

Constants SSH_PLD_TYPE_CMD The payload is a command structure with optional command payload. struct ssh_command ¶ Payload of a command-type frame. Definition : struct ssh_command { u8 type; u8 tc; u8 tid; u8 sid; u8 iid; __le16 rqid; u8 cid; }; Members type The type of the payload. See enum ssh_payload_type . Should be SSH_PLD_TYPE_CMD for this struct. tc Command target category. tid Target ID. Indicates the target of the message. sid Source ID.

Indicates the source of the message. iid Instance ID. rqid Request ID. Used to match requests with responses and differentiate between responses and events. cid Command ID. SSH_MESSAGE_LENGTH ¶ SSH_MESSAGE_LENGTH (payload_size) Compute length of SSH message. Parameters payload_size Length of the payload inside the SSH frame. Return Returns the length of a SSH message with payload of specified size. SSH_COMMAND_MESSAGE_LENGTH ¶ SSH_COMMAND_MESSAGE_LENGTH (payload_size) Compute length of SSH command message.

Parameters payload_size Length of the command payload. Return Returns the length of a SSH command message with command payload of specified size. SSH_MSGOFFSET_FRAME ¶ SSH_MSGOFFSET_FRAME (field) Compute offset in SSH message to specified field in frame. Parameters field The field for which the offset should be computed. Return Returns the offset of the specified struct ssh_frame field in the raw SSH message data as.

Takes SYN bytes (u16) preceding the frame into account. SSH_MSGOFFSET_COMMAND ¶ SSH_MSGOFFSET_COMMAND (field) Compute offset in SSH message to specified field in command. Parameters field The field for which the offset should be computed. Return Returns the offset of the specified struct ssh_command field in the raw SSH message data. Takes SYN bytes (u16) preceding the frame and the frame CRC (u16) between frame and command into account. u16 ssh_crc ( const u8 * buf , size_t len ) ¶ Compute CRC for SSH messages.

Parameters const u8 *buf The pointer pointing to the data for which the CRC should be computed. size_t len The length of the data for which the CRC should be computed. Return Returns the CRC computed on the provided data, as used for SSH messages. u16 ssh_rqid_next_valid ( u16 rqid ) ¶ Return the next valid request ID. Parameters u16 rqid The current request ID. Return Returns the next valid request ID, following the current request ID provided to this function.

This function skips any request IDs reserved for events. u16 ssh_rqid_to_event ( u16 rqid ) ¶ Convert request ID to its corresponding event ID. Parameters u16 rqid The request ID to convert. bool ssh_rqid_is_event ( u16 rqid ) ¶ Check if given request ID is a valid event ID. Parameters u16 rqid The request ID to check. u16 ssh_tc_to_rqid ( u8 tc ) ¶ Convert target category to its corresponding request ID. Parameters u8 tc The target category to convert. u8 ssh_tid_to_index ( u8 tid ) ¶ Convert target ID to its corresponding target index.

Parameters u8 tid The target ID to convert. bool ssh_tid_is_valid ( u8 tid ) ¶ Check if target ID is valid/supported. Parameters u8 tid The target ID to check. struct ssam_span ¶ Reference to a buffer region. Definition : struct ssam_span { u8 *ptr; size_t len; }; Members ptr Pointer to the buffer region. len Length of the buffer region. Description A reference to a (non-owned) buffer segment, consisting of pointer and length.

Use of this struct indicates non-owned data, i.e. data of which the life-time is managed (i.e. it is allocated/freed) via another pointer. enum ssam_ssh_tid ¶ Target/source IDs for Serial Hub messages. Constants SSAM_SSH_TID_HOST We as the kernel Serial Hub driver. SSAM_SSH_TID_SAM The Surface Aggregator EC. SSAM_SSH_TID_KIP Keyboard and perihperal controller. SSAM_SSH_TID_DEBUG Debug connector. SSAM_SSH_TID_SURFLINK SurfLink connector. enum ssh_packet_base

The rest of this page is on the live site.