hte_request_ts_ns(9)
β¨ hte_request_ts_ns(9) β¨
Okay bestie, so this one is from the Kernel API Manual β it's hte_request_ts_ns, and it's literally the API to request and enable hardware timestamp in nanoseconds. Grab your strawberry matcha π and let's get into it, because this little function is doing the most.
π SYNOPSIS π
int hte_request_ts_ns (struct hte_ts_desc *desc , hte_ts_cb_t cb ,
hte_ts_sec_cb_t tcb , void *data );
πΈ ARGUMENTS πΈ
descβ a pre-allocated and initialized timestamp descriptor. Like, you have to hand it over ready to go, bestie, it's not gonna birth one for you πcbβ the callback that pushes the timestamp data to the consumer. This is the main character of the callbacks β¨tcbβ optional callback. If you provide it, the subsystem initializes a workqueue. It gets called whencbreturnsHTE_RUN_SECOND_CB. So it's giving "second act energy" πdataβ client data, used during thecbandtcbcallbacks. Your little bag of goodies that rides along π«Ά
π¦ DESCRIPTION π¦
So the entity here is provider specific β for example GPIO lines, signals, buses, etc... no cap, it can be a whole bunch of things π The API allocates the necessary resources and enables the timestamp. That's the whole vibe: you ask, it allocates, it enables, slay.
π CONTEXT π
Holds mutex lock. Like, it's gonna grab that lock, so don't be weird about it π
β RETURN β
Returns 0 on success or a negative error code on failure. That's it, that's the whole mood.
π SEE ALSO π
- Kernel file
./drivers/hte/hte.c struct hte_ts_info(9)struct hte_device(9)hte_ts_put(9)hte_disable_ts(9)hte_enable_ts(9)of_hte_req_count(9)hte_ts_get(9)devm_hte_request_ts_ns(9)hte_init_line_attr(9)hte_get_clk_src_info(9)hte_push_ts_ns(9)devm_hte_register_chip(9)
And that's the whole page, bestie β go forth and timestamp responsibly π
sign-off szn π β this iconic little page lives in ./drivers/hte, dated October 2026, and it's filed under hte_request_ts_ns(9) in the Kernel API Manual. Obsessed, honestly. π₯
π¦ 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