__prci_register_clocks(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __prci_register_clocks β€” register clock controls in the PRCI πŸ’–

okay so bestie, welcome to the Kernel API Manual section 9 page for __prci_register_clocks β€” yes that's a mouthful, and yes the double underscore is load-bearing, don't touch it 🫢 this is the little helper that gets your SiFive PRCI clock controls officially introduced to the Linux clock framework. it's giving "networking but for clocks" honestly ✨


✨ SYNOPSIS ✨

int __prci_register_clocks (struct device *dev , struct __prci_data *pd
, const struct prci_clk_desc *desc );

like, three args, one int out. no cap. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the Linux struct device 🐧 that's your device, your main character, the whole reason we're here.
  • pd β€” the pointer for PRCI per-device instance data. it's the "who am I, where do I live" bag of stuff for this specific PRCI instance. πŸŽ’
  • desc β€” the pointer for the information of clocks of each SoC. literally the per-SoC clock lore. 🌸

πŸ¦‹ DESCRIPTION πŸ¦‹

it registers the list of clock controls described in __prci_init_clocks[] with the Linux clock framework. that's the whole vibe πŸ’« the array says "here are the clocks", and this function goes "say less" and hands them over to the clock framework so they actually exist as far as Linux is concerned πŸ”₯


πŸ‘‘ RETURN πŸ‘‘

returns 0 upon success, or a negative error code upon failure. so like β€” zero means slay, negative means 😭, check your error handling bestie, don't just ignore it πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

kernel file ./drivers/clk/sifive/sifive-prci.c, plus the whole friend group:

iykyk πŸ’€ go read them, they're iconic.


and that's the page!! sourced from ./drivers/clk/sifive, dated October 2026 β€” so mark your calendars bestie, this manual's from the future and it ate 🌈⭐ bye mwah πŸ’–

πŸ“¦ where this page comes from