thc_spi_write_config(9)
π thc_spi_write_config(9) β like, the SPI write config glow-up
Hey bestie, welcome to the thc_spi_write_config page from the Kernel API Manual β¨. Yes, it's a kernel function, yes it's got six arguments, and yes we're gonna get through it together. Grab your iced coffee π.
πΈ NAME πΈ
thc_spi_write_config β the one that configures SPI bus write attributes. That's it. That's the whole vibe. π
π SYNOPSIS π
int thc_spi_write_config (struct thc_device *dev , u32 spi_freq_val ,
u32 io_mode , u32 opcode , u32 spi_wr_mps , u32 perf_limit );
Returns an int, takes six things, lowkey iconic honestly π
π¦ ARGUMENTS π¦
Six of them. Six! Let's go one by one, no skipping, we don't do that here π«Ά
devβ the pointer of THC private device context. Your main character struct, fr fr.spi_freq_valβ the SPI write frequency value πio_modeβ the SPI write IO mode β¨opcodeβ the write opcode. It's giving "instruction" energy.spi_wr_mpsβ the SPI write max packet size π¦perf_limitβ the performance limitation, and plot twist: it's measured in units of 10us β±οΈ
π RETURN π
0 on success, other error codes on failed. So basically if you get 0, slay. Anything else? That's a no from the kernel, bestie π
π SEE ALSO π
This is the part where the manpage goes full group-chat-tagging-everyone. First off, the actual kernel file, no cap:
Kernel file ./drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
And then the whole squad π β go check these out:
thc_clear_state(9)thc_dev_init(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_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)
π Not a single one of those is skippable. If you came here for thc_spi_read_config β that's the sibling page, they're twinning.
π§ Sign-off π§
This little gem lives at ./drivers/hid/intel-thc-hid/in... and it's dated October 2026 β yes, the future, she's ahead of her time β. Manual section thc_spi_write_config(9), Kernel API Manual, and honestly? Obsessed. Bye bestie, go configure those write attributes πβ¨π
π¦ 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