ptp_clock_index_by_of_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the device of_node pointer 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
  • -1 on failure 😭 so like... check that, bestie. -1 means 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

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