zynqmp_pm_clock_get_parents(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zynqmp_pm_clock_get_parents(9) πŸ’…

Okay so bestie, welcome to the Kernel API Manual page for zynqmp_pm_clock_get_parents(9) β€” yes that's the whole name, it's giving "my function name is a paragraph" but we move 🫢. This is the ZynqMP clock corner of the kernel, and honestly? It's iconic.


✨ NAME ✨

zynqmp_pm_clock_get_parents β€” grab the first 3 parents of a clock for a given id. That's it, that's the vibe. Three parents, no cap πŸ’…


🌸 SYNOPSIS 🌸

int zynqmp_pm_clock_get_parents (u32 clock_id , u32 index , struct
parents_resp *response );

πŸŽ€ ARGUMENTS πŸŽ€

  • clock_id β€” the Clock ID, aka which clock we're talking about πŸ’–
  • index β€” the Parent index, aka where in the parent lineup you're starting πŸ‘‘
  • response β€” the Parents of the given clock, where the answer gets dropped off πŸ¦‹

⭐ DESCRIPTION ⭐

So this function is literally used to get 3 parents for the clock specified by the given clock ID. Three at a time, that's the whole deal ✨

Here's the cute part: this API returns 3 parents with a single response. But what if your clock has more than 3 parents? Not me leaving you hanging β€” there's a whole loop situation. To get the other parents, the master should call the same API in a loop with a new parent index till error is returned. Lowkey genius, highkey efficient 😭

The example, because examples ate:

  • First call should have index 0, which will return parents 0, 1 and 2 πŸ“
  • Next call, index should be 3, which will return parent 3, 4 and 5 🧚
  • …and so on, forever, until the error shows up and tells you to stop πŸ’€

🌈 RETURN 🌈

0 on success, else error+reason β€” like, it tells you what went wrong, we love a communicative king πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/clk/zynqmp/clkc.c, plus this whole friend group:


Heads up bestie: this page lives at ./drivers/clk/zynqmp, it's dated October 2026, and it answers to the name zynqmp_pm_clock_get_parents(9). Screenshot it, memorize it, live by it πŸ’œ

That's the whole page, periodt. Go get those three parents 🌸🫢

πŸ“¦ where this page comes from