clk_hw_round_rate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… clk_hw_round_rate(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual page for clk_hw_round_rate(9) β€” yes it's a real function, yes it's lowkey the moment your rate gets ✨glowed up✨ so the hardware can actually deal with it. let's get into it πŸŽ€


🌸 NAME 🌸

clk_hw_round_rate β€” round the given rate for a hw clk ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned long clk_hw_round_rate (struct clk_hw *hw , unsigned long rate
);

πŸ’– ARGUMENTS πŸ’–

  • hw β€” the hw clk for which we are rounding a rate. this is the main character here πŸ‘‘
  • rate β€” the rate which is to be rounded. she's giving raw input energy, about to get a makeover πŸ’…

🌈 DESCRIPTION 🌈

So here's the vibe: you hand her a rate as input, and she rounds it to a rate that the clk can actually use. no cap, it's that simple β€” takes your number, gives it the vibe check, returns one that fits the hardware's whole situation 🫢


⭐ CONTEXT ⭐

🚨 important bestie 🚨 prepare_lock must be held. fr fr, don't skip this one.

This is for clk providers to call from within clk_ops, like .determine_rate β€” iykyk πŸ’œ


πŸ”₯ RETURN πŸ”₯

  • returns the rounded rate of the hw clk if the clk supports the determine_rate operation ✨
  • else, it returns the parent rate πŸ’€ (still valid, just not the glow-up you asked for)

πŸŽ€ SEE ALSO πŸŽ€

okay this list is long long β€” but every single one is here, no skips, periodt πŸ’…

Kernel file ./drivers/clk/clk.c:


and that's the whole page bestie, you ate that 🫢✨ this icon lives at ./drivers/clk, dated October 2026 β€” mwah πŸ’‹πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from