thc_dev_init(9)
π thc_dev_init(9) β like, the whole glow-up β¨
okay so bestie, welcome to the Kernel API Manual π β this is the page for thc_dev_init(9), and honestly it's giving "main character origin story" because literally everything else on this page depends on this one working first. no pressure or anything π
β¨ NAME β¨
thc_dev_init β allocate and initialize the THC device structure π (yes, both. she does it all.)
πΈ SYNOPSIS πΈ
struct thc_device * thc_dev_init (struct device *device , void __iomem
*mem_addr );
like, that's the whole signature. two args in, one pointer out π«Ά
π¦ ARGUMENTS π¦
deviceβ the pointer of device structure. yep, that's the struct, hand her the pointer and off she goes β¨mem_addrβ the pointer of MMIO memory address. this one's thevoid __iomem *, so it's lowkey special β memory-mapped I/O energy π
π₯ RETURN π₯
- π the
thc_devicepointer on success - π
NULLon failed
that's it. that's the vibe check. if you get NULL back, she did not slay, and you should probably not keep going.
π SEE ALSO π
the kernel file this lives in (iykyk):
./drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
and the whole friend group β every single one, no cap, in order:
thc_clear_state(9)thc_tic_pio_read(9)thc_tic_pio_write(9)thc_tic_pio_write_and_read(9)thc_interrupt_config(9)thc_int_trigger_type_select(9)thc_interrupt_enable(9)thc_interrupt_quiesce(9)thc_set_pio_interrupt_support(9)thc_ltr_config(9)thc_change_ltr_mode(9)thc_ltr_unconfig(9)thc_int_cause_read(9)thc_interrupt_handler(9)thc_port_select(9)thc_spi_read_config(9)thc_spi_write_config(9)thc_spi_input_output_address_config(9)thc_i2c_subip_init(9)thc_i2c_subip_regs_save(9)thc_i2c_subip_regs_restore(9)thc_i2c_set_rx_max_size(9)thc_i2c_rx_max_size_enable(9)thc_i2c_set_rx_int_delay(9)thc_i2c_rx_int_delay_enable(9)
ngl bestie, if you're here you're probably about to read like twenty-five more of these. hydrate. stretch. you got this π
so yeah π§ that's the page. footer says October 2026 and the source line is ./drivers/hid/intel-thc-hid/in... (truncated in the original, not me being lazy, I promise π). going out with a thc_dev_init(9) flourish β mwah π
π¦ 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