thc_tic_pio_write_and_read(9)
π
thc_tic_pio_write_and_read (9) β Kernel API Manual β¨
okay so bestie, welcome to the glow-up of the THC kernel API manual π this one's a little function with main character energy: thc_tic_pio_write_and_read β it writes some data, and then it reads some data, both through PIO. iconic behavior, honestly.
πΈ NAME πΈ
thc_tic_pio_write_and_read β literally what it says on the tin: write data followed by read data, by PIO. no cap. π¦
β¨ SYNOPSIS β¨
int thc_tic_pio_write_and_read (struct thc_device *dev , const u32
address , const u32 write_size , const u32 *write_buffer , const u32
read_size , u32 *actual_size , u32 *read_buffer );
she takes seven arguments and returns an int. high maintenance? maybe. worth it? absolutely π
π«Ά ARGUMENTS π«Ά
devβ the pointer of the THC private device context. your little home base, your main character's apartment πaddressβ slave address for the PIO operation. gotta know where you're going πwrite_sizeβ PIO write data size. how much you're serving, bestie πwrite_bufferβ the pointer of the write data buffer. this is where the served data lives β¨read_sizeβ expected PIO read data size. keyword: expected β seeactual_sizebelow if you're nosy πactual_sizeβ the pointer of the actual read data size. reality check, lowkey πread_bufferβ the pointer of PIO read data buffer. where the incoming data lands π
π₯ RETURN π₯
0 on success, other error codes on failed. so like β zero means slay, anything else means something went sideways. not me checking the return value every single time π
π SEE ALSO π
the kernel file this lives in:
./drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
and now the whole friend group π«Ά β every single one of them, in order, no skipping:
thc_clear_state(9)thc_dev_init(9)thc_tic_pio_read(9)thc_tic_pio_write(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)
periodt. read them all or don't come back to the group chat π
okay that's the whole page!! this came out of the source file ./drivers/hid/intel-thc-hid/in... and the date on it is October 2026 πΈ so go forth, pass those pointers correctly, and remember: 0 on success, bestie. 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