spi_take_timestamp_post(9)
π spi_take_timestamp_post β Kernel API Manual β¨
okay bestie, so this one's a helper function living in the Kernel API Manual, and it's basically the "you're done, let's stamp it" friend for your SPI driver. no cap. π
πΈ SYNOPSIS πΈ
void spi_take_timestamp_post (struct spi_controller *ctlr , struct
spi_transfer *xfer , size_t progress , bool irqs_off );
that's the whole vibe β void, so it gives nothing back, it just does the thing. π«Ά
β¨ ARGUMENTS β¨
ctlrβ pointer to thespi_controllerstructure of your driver. like, the controller it all belongs to, y'know? πxferβ pointer to the transfer that's getting timestamped. the one being stamped. βprogressβ how many words have been transferred so far. words, not bytes, bestie, the manpage is literally yelling this at us πirqs_offβ iftrue, it will re-enable IRQs and preemption for the local CPU. yes, "re-enable" β that's the direction it goes. π§
π¦ DESCRIPTION π¦
So this is a helper for drivers that want to collect the end of the TX timestamp for the requested byte from the SPI transfer. it's giving "final stamp, closing shift" energy. π
the iconic part is you can call it with an arbitrary frequency β go off, call it as much as you want β because only the first call where tx exceeds or is equal to the requested word will actually be timestamped. everything after that is just background noise, main character only. πβ¨
π SEE ALSO π
the kernel file ./drivers/spi/spi.c is the mothership, and here's the whole group chat of friends and neighbours:
__spi_register_driver(9)spi_alloc_device(9)spi_add_device(9)spi_new_device(9)spi_unregister_device(9)spi_register_board_info(9)spi_res_alloc(9)spi_res_free(9)spi_res_add(9)spi_res_release(9)spi_finalize_current_transfer(9)__spi_pump_messages(9)spi_pump_messages(9)spi_take_timestamp_pre(9)spi_set_thread_rt(9)spi_get_next_queued_message(9)spi_finalize_current_message(9)spi_queued_transfer(9)spi_flush_queue(9)of_register_spi_devices(9)spi_new_ancillary_device(9)devm_spi_new_ancillary_device(9)acpi_spi_count_resources(9)acpi_spi_device_alloc(9)spi_target_abort(9)__spi_alloc_controller(9)__devm_spi_alloc_controller(9)spi_get_gpio_descs(9)spi_register_controller(9)devm_spi_register_controller(9)spi_unregister_controller(9)spi_replace_transfers(9)spi_split_transfers_maxsize(9)spi_split_transfers_maxwords(9)spi_set_cs_timing(9)spi_setup(9)spi_optimize_message(9)spi_unoptimize_message(9)devm_spi_optimize_message(9)spi_async(9)spi_sync(9)spi_sync_locked(9)spi_bus_lock(9)spi_bus_unlock(9)spi_write_then_read(9)
lowkey the spi_take_timestamp_pre(9) one right there in the middle is this function's sibling β pre and post, the timestamp duo, iykyk π«Ά
and that's the whole page, bestie, you ate β¨ this cutie came out of ./drivers/spi and it's dated October 2026 β so like, go forth and timestamp responsibly πππ
π¦ 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