STRUCT HSI_PORT(9)
π
struct hsi_port(9) β HSI port device π
okay bestie, welcome to the hsi_port struct. this is a kernel API manual page, and honestly? it's giving "little struct that could." lowkey iconic. let's get into it β¨
β¨ NAME β¨
struct hsi_port β the HSI port device itself. that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
struct hsi_port {
struct device device;
struct hsi_config tx_cfg;
struct hsi_config rx_cfg;
unsigned int num;
unsigned int shared:1;
int claimed;
struct mutex lock;
int (*async)(struct hsi_msg *msg);
int (*setup)(struct hsi_client *cl);
int (*flush)(struct hsi_client *cl);
int (*start_tx)(struct hsi_client *cl);
int (*stop_tx)(struct hsi_client *cl);
int (*release)(struct hsi_client *cl);
struct blocking_notifier_head n_head;
};
like, look at her. all those function pointers. main character energy fr fr π
π§ Members π§
okay so this is the part where we meet the whole cast. every single one of them. no skips, no cap. π
deviceβ the driver model representation of the device. like, the official paperwork that says "yes, this is a device." πtx_cfgβ the current TX path configuration. the transmit side's whole setup. β¨rx_cfgβ the current RX path configuration. the receive side's whole setup. πnumβ the port number. which port is this? this one. π₯sharedβ set when the port can be shared by different clients. sharing is caring, bestie π«Άclaimedβ reference count of clients which claimed the port. keeping track of who called dibs. πlockβ serialize port claim. no fighting over the port, we have a mutex for that. πasyncβ asynchronous transfer callback. yes, it's asynchronous. she doesn't wait around. πsetupβ callback to set the HSI client configuration. getting the client all set up. πΈflushβ callback to clean the HW state and destroy all pending transfers. dramatic? maybe. necessary? absolutely. πstart_txβ callback to inform that a client wants to TX data. they're ready to send, bestie. βstop_txβ callback to inform that a client no longer wishes to TX data. okay, they're done. πreleaseβ callback to inform that a client no longer uses the port. freeing it up for the next person. πn_headβ notifier chain for signaling port events to the clients. the group chat for port events, basically. π
π SEE ALSO π
kernel file ./include/linux/hsi/hsi.h β and all her friends:
struct hsi_channel(9)struct hsi_config(9)struct hsi_board_info(9)struct hsi_client(9)struct hsi_client_driver(9)struct hsi_msg(9)struct hsi_controller(9)hsi_id(9)hsi_port_id(9)hsi_setup(9)hsi_flush(9)hsi_async_read(9)hsi_async_write(9)hsi_start_tx(9)hsi_stop_tx(9)
iykyk π
okay that's the whole page, bestie../include/linux/hsi, October 2026,struct hsi_port(9). slay. periodt. ππ β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms