STRUCT HSI_PORT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

iykyk πŸ’œ


okay that's the whole page, bestie. ./include/linux/hsi, October 2026, struct hsi_port(9). slay. periodt. πŸŒˆπŸ’…βœ¨
πŸ“¦ where this page comes from