ptp_clock_index_by_of_node(9)
π ptp_clock_index_by_of_node β Kernel API Manual, bestie edition π
okay so welcome to the Kernel API Manual entry for ptp_clock_index_by_of_node, and yes we're doing this together because you're gonna slay this π
β¨ NAME β¨
ptp_clock_index_by_of_node β get the device index of a PTP clock, based on the PTP device's of_node π¦
Like, that's the whole vibe. You hand it a node, it hands you back an index. Iconic behavior honestly.
πΈ SYNOPSIS πΈ
int ptp_clock_index_by_of_node (struct device_node *np );
That's it. One function, one argument, no drama π
π ARGUMENTS π
npβ thedevice of_nodepointer of the PTP device π«Ά that's your little device-tree handle, the thing that tells the kernel which PTP device we're talking about. Hand it over and let the function cook.
β RETURN β
- The PHC index on success π like yes queen, you got your index
-1on failure π so like... check that, bestie.-1means it did not go well.
fr fr: if you see -1 coming back, do not just keep vibing β something didn't resolve. π
π₯ SEE ALSO π₯
okay this list is long and honestly it ate π
Kernel file: ./include/linux/ptp_clock_kernel.h
struct ptp_clock_request(9)struct ptp_system_timestamp(9)struct ptp_clock_info(9)struct ptp_clock_event(9)scaled_ppm_to_ppb(9)diff_by_scaled_ppm(9)adjust_by_scaled_ppm(9)ptp_clock_register(9)ptp_clock_unregister(9)ptp_clock_event(9)ptp_clock_index(9)ptp_clock_index_by_dev(9)ptp_find_pin(9)ptp_find_pin_unlocked(9)ptp_schedule_worker(9)ptp_cancel_worker_sync(9)ptp_get_vclocks_index(9)ptp_convert_timestamp(9)
iykyk, that's the whole PTP friend group right there π
mwah π that's the whole page! this one lives under <code>./include/linux</code>, dated <b>October 2026</b>, and it's page <code>ptp_clock_index_by_of_node(9)</code> of the Kernel API Manual β go forth and get those indices, bestie, you're literally the main character of the device tree π§β¨
π¦ 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