scmi_clk_ops_select(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scmi_clk_ops_select(9) β€” like, the Kernel API Manual page you didn't know you needed ✨

okay so bestie, buckle up, because this one's from the Kernel API Manual and it's genuinely so much less scary than the name makes it look. we're picking out the right set of clock operations. that's it. that's the vibe. πŸ•πŸ’–


πŸŽ€ NAME πŸŽ€

scmi_clk_ops_select β€” Select a proper set of clock operations

like, literally just choose the right ops for the clock. icon behavior honestly.


✨ SYNOPSIS ✨

const struct clk_ops * scmi_clk_ops_select (struct scmi_device *sdev ,
struct scmi_clk *sclk , bool atomic_capable , unsigned int
atomic_threshold_us , const struct clk_ops **clk_ops_db , size_t db_size
);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • sdev β€” pointer to the SCMI device. it's giving "who am I doing this for" energy πŸ’«
  • sclk β€” a reference to an SCMI clock descriptor. the clock in question, the main character πŸ•°οΈ
  • atomic_capable β€” a flag that says whether atomic mode is supported by the transport. yes/no vibes only πŸ”₯
  • atomic_threshold_us β€” the platform atomic threshold value, in microseconds: the clk_ops are atomic when the clock enable latency is less than this threshold. tiny number, big consequences ngl ⏱️
  • clk_ops_db β€” a reference to the array used as a database to store all the created clock operations combinations. it's the group chat archive fr fr πŸ“š
  • db_size β€” maximum number of entries held by clk_ops_db. the capacity, the limit, the "how many besties fit in this car" number πŸš—πŸ’¨

πŸ’œ DESCRIPTION πŸ’œ

so here's the whole storyline, no cap:

After having built a bitmap descriptor to represent the set of features needed by this SCMI clock, at first use it to lookup into the set of previously allocated clk_ops to check if a suitable combination of clock operations was already created; when no match is found, allocate a brand new set of clk_ops satisfying the required combination of features and save it for future references. πŸ—‚οΈβœ¨

In this way, only one set of clk_ops is ever created for each different combination that is effectively needed by a driver instance. reuse queen. sustainable icon. we love to see it πŸ‘‘

lowkey the whole point: don't make a new one if the right one already exists. look it up first, bestie. 🎯

🌈 RETURN 🌈

A pointer to the allocated and configured clk_ops on success, or NULL otherwise.

so either you get your cute little pointer back, or you get NULL and have to deal πŸ˜­πŸ’€


🫢 SEE ALSO 🫢

go read those too, iykyk πŸ’…


okay that's the whole page!! πŸŽ€ and for the cute lil sign-off: this one lives under ./drivers/clk and it's dated October 2026 β€” stamped, sealed, slayed. see you in the source tree bestie πŸŒΈβ­πŸ’–

πŸ“¦ where this page comes from