thc_spi_read_config(9)
π thc_spi_read_config(9) β Kernel API Manual πΈ
okay bestie, welcome to the group chat for thc_spi_read_config β¨ This is a page straight out of the Kernel API Manual, and honestly? It's giving "small function, big job" energy. Sit down, grab a strawberry π, and let's get into it.
π NAME π
thc_spi_read_config β the cutie that configures SPI bus read attributes π
No cap, that's literally the whole job. It goes in, it sets up how your SPI bus reads stuff, and it leaves. Iconic behavior.
β¨ SYNOPSIS β¨
int thc_spi_read_config (struct thc_device *dev , u32 spi_freq_val , u32
io_mode , u32 opcode , u32 spi_rd_mps );
Bestie, look at that signature β five params, returns an int, so clean, so demure π
π¦ ARGUMENTS π¦
devβ the pointer of the THC private device context π like, this is your main character. It's a pointer to the THC private device context, and everything else kind of hangs off it.spi_freq_valβ the SPI read frequecy value π₯ (and yes, we're keeping that spelling exactly as the kernel wrote it, no notes, we don't edit the source, periodt).io_modeβ the SPI read IO mode π the vibe check for how reads travel on the bus.opcodeβ the read opcode β the actual instruction code for reads. Small but mighty, iykyk.spi_rd_mpsβ the SPI read max packet size π literally how big a read packet is allowed to get.
π RETURN π
0on success π«Ά- other error codes on failed π₯² (that's
failed, keep it exactly like that, fr fr β no cleanup, no edits, we respect the original)
Heads up bestie: if it comes back non-zero, something's not slaying. The page just says "other error codes on failed," so that's all we've got to go on β don't let anyone tell you more than the manpage does.
π SEE ALSO π
The kernel file lives at ./drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c π that's where the source is, no cap.
And here's the whole friend group, alphabeticallyβ¦ no wait, in exactly the order the page lists them π :
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_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)
Go read them too, bestie π they're all part of the same era of the kernel.
π§ Sign-off π§
This little masterpiece comes from source path ./drivers/hid/intel-thc-hid/inβ¦ and is dated October 2026 πΈ and the page itself is thc_spi_read_config(9). That's the whole footer, we're not skipping it, we're celebrating it ππ
Alright, go configure some SPI read attributes. Slay π β¨
π¦ 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