STRUCT THC_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct thc_device(9) πŸ’–

hey bestie, welcome to this page from the Kernel API Manual β€” it's all about struct thc_device, the THC private device struct. no cap, this is the group-chat rundown of every field. πŸ’…


✨ NAME ✨

struct thc_device β€” THC private device struct. that's the whole name section, short and iconic. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the struct in all its glory β€” copy it exactly, bestie, no edits:

struct thc_device {
    struct device *dev;
    struct regmap *thc_regmap;
    void __iomem *mmio_addr;
    struct mutex thc_bus_lock;
    enum thc_port_type port_type;
    bool pio_int_supported;
    struct thc_dma_context *dma_ctx;
    struct thc_wot wot;
    wait_queue_head_t write_complete_wait;
    wait_queue_head_t swdma_complete_wait;
    bool write_done;
    bool swdma_done;
    u32 perf_limit;
    u32 *i2c_subip_regs;
    u32 i2c_max_rx_size;
    u32 i2c_int_delay_us;
    bool i2c_max_rx_size_en;
    bool i2c_int_delay_en;
};

tiny aside: dev is in the struct, but the original Members list below doesn't describe it β€” so I'm not inventing lore. πŸ™ˆ

πŸ‘― Members πŸ‘―

  • thc_regmap β€” the MMIO regmap structure for accessing THC registers ✨
  • mmio_addr β€” the MMIO registers address, i.e. where those registers live.
  • thc_bus_lock β€” mutex locker for THC config; it's giving bouncer-at-the-config-club energy πŸ’…
  • port_type β€” the port type of this THC port instance.
  • pio_int_supported β€” flag saying PIO interrupts are supported. 🫢
  • dma_ctx β€” DMA-specific data.
  • wot β€” THC Wake-on-Touch data.
  • write_complete_wait β€” signal event for DMA write complete.
  • swdma_complete_wait β€” signal event for SWDMA sequence complete.
  • write_done β€” bool value that says whether the DMA write is done.
  • swdma_done β€” bool value that says whether the SWDMA sequence is done.
  • perf_limit β€” the delay between a read operation and a write operation.
  • i2c_subip_regs β€” the copy of THC I2C sub-system registers for resuming restore.
  • i2c_max_rx_size β€” I2C Rx transfer max input size.
  • i2c_int_delay_us β€” I2C input interrupt delay; the unit is us.
  • i2c_max_rx_size_en β€” bool value that indicates whether I2C max input size control is enabled or not.
  • i2c_int_delay_en β€” bool value that indicates whether I2C input interrupt delay is enabled or not.

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.h πŸ‘€
  • struct thc_i2c_config(9)

xoxo, your kernel bestie πŸ’– β€” source/version: ./drivers/hid/intel-thc-hid/in...; dated October 2026. periodt.

πŸ“¦ where this page comes from