scmi_clk_ops_select(9)
π 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 theSCMIdevice. 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: theclk_opsare 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 byclk_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 π«Ά
- Kernel file
./drivers/clk/clk-scmi.c scmi_clk_ops_alloc(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms