STRUCT QUICKSPI_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so welcome to struct quickspi_device β€” the THC QuickSpi device struct, bestie. it's a 9 (kernel API manual) situation, and this page is basically the whole anatomy of the thing. let's get into it ✨


✨ SYNOPSIS ✨

here's the whole struct, character for character, no notes, she's gorgeous:

struct quickspi_device {
    struct device *dev;
    struct pci_dev *pdev;
    struct thc_device *thc_hw;
    struct hid_device *hid_dev;
    struct acpi_device *acpi_dev;
    struct quickspi_driver_data *driver_data;
    enum quickspi_dev_state state;
    void __iomem *mem_addr;
    struct hidspi_dev_descriptor dev_desc;
    u32 input_report_hdr_addr;
    u32 input_report_bdy_addr;
    u32 output_report_addr;
    u32 spi_freq_val;
    u32 spi_read_io_mode;
    u32 spi_write_io_mode;
    u32 spi_read_opcode;
    u32 spi_write_opcode;
    u32 limit_packet_size;
    u32 spi_packet_size;
    u32 performance_limit;
    u32 active_ltr_val;
    u32 low_power_ltr_val;
    u8 *report_descriptor;
    u8 *input_buf;
    u8 *report_buf;
    u32 report_buf_size;
    u32 report_len;
    wait_queue_head_t reset_ack_wq;
    bool reset_ack;
    wait_queue_head_t nondma_int_received_wq;
    bool nondma_int_received;
    wait_queue_head_t report_desc_got_wq;
    bool report_desc_got;
    wait_queue_head_t get_report_cmpl_wq;
    bool get_report_cmpl;
    wait_queue_head_t set_report_cmpl_wq;
    bool set_report_cmpl;
    struct work_struct recover_work;
    bool recovery_disabled;
 };

🌸 Members 🌸

okay so field by field, and yes i'm doing all of them, we don't skip πŸ’…

  • dev β€” points at the kernel device 🫢
  • pdev β€” points at the PCI device
  • thc_hw β€” points at the THC device
  • hid_dev β€” points at the hid device
  • acpi_dev β€” points at the ACPI device
  • driver_data β€” points at the quickspi-specific driver data
  • state β€” the THC SPI device state
  • mem_addr β€” the MMIO memory address ✨
  • dev_desc β€” device descriptor for the HIDSPI protocol
  • input_report_hdr_addr β€” device input report header address
  • input_report_bdy_addr β€” device input report body address
  • spi_freq_val β€” device supported max SPI frequency, in Hz ⚑
  • spi_read_io_mode β€” device supported SPI read io mode
  • spi_write_io_mode β€” device supported SPI write io mode
  • spi_read_opcode β€” device read opcode
  • spi_write_opcode β€” device write opcode
  • limit_packet_size β€” 1 means limit read/write packet to 64Bytes; 0 means the device has no packet size limitation for read/write πŸŽ€
  • performance_limit β€” delay time, in ms. if the device has a performance limitation, you must give a delay before a write operation after a read operation. like, she needs a lil breather, respect it πŸ™ˆ
  • active_ltr_val β€” THC active LTR value
  • low_power_ltr_val β€” THC low power LTR value
  • report_descriptor β€” stores a copy of the device report descriptor
  • input_buf β€” stores a copy of the latest input report data
  • report_buf β€” stores a copy of the latest input/output report packet from set/get feature
  • report_len β€” the length of the input/output report packet
  • reset_ack_wq β€” workqueue for waiting on the reset response from the device
  • reset_ack β€” indicates whether the reset response was received or not
  • nondma_int_received_wq β€” workqueue for waiting on the THC non-DMA interrupt
  • nondma_int_received β€” indicates whether the THC non-DMA interrupt was received or not
  • report_desc_got_wq β€” workqueue for waiting on the device report descriptor
  • report_desc_got β€” indicates whether the device report descriptor was received or not
  • recover_work β€” the work structure for recovery πŸ”₯
  • recovery_disabled β€” whether the recovery work is blocked during teardown
ngl a few fields are chilling in the struct up there and the Members list just doesn't describe them: output_report_addr, spi_packet_size, report_buf_size, get_report_cmpl_wq, get_report_cmpl, set_report_cmpl_wq, and set_report_cmpl. they're real, they exist, the page just doesn't say more. no cap πŸ€·β€β™€οΈ

πŸ¦‹ SEE ALSO πŸ¦‹

  • kernel file ./drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h πŸ“
  • struct quickspi_driver_data(9) β€” go read her next, she's the other half of the vibe iykyk

and that's the whole page bestie πŸ’– this one came out of ./drivers/hid/intel-thc-hid/in... (yeah the path got cut off in the footer, tragic, but that's literally what it says) and it's dated October 2026. slay πŸŽ€βœ¨πŸ‘‘

πŸ“¦ where this page comes from