dev_pm_opp_...pufreq_table(9)
π dev_pm_opp_init_cpufreq_table β Kernel API Manual π
okay so bestie, welcome to the dev_pm_opp_...pufreq_table(9) page from the Kernel API Manual β yes that ellipsis is really in the header, no I didn't do that, it's just the vibe of the section title iykyk β¨
β¨ NAME β¨
dev_pm_opp_init_cpufreq_table β literally just creating a cpufreq table for a device π¦
πΈ SYNOPSIS πΈ
int dev_pm_opp_init_cpufreq_table (struct device *dev , struct
cpufreq_frequency_table **opp_table );
that's the whole thing, copy it exactly please, character for character, no cap π«Ά
π ARGUMENTS π
devβ the device we're doing this whole operation for πopp_tableβ the Cpufreq table that gets handed back to whoever called us, main character of the return values fr
π DESCRIPTION π
so what we're doing here is generating a cpufreq table for a device you provide. the big assumption though β and this is important β is that the opp table is already initialized and ready for usage. like, table's set, we're just building the cpufreq side of it π
This function allocates the required memory for the cpufreq table. It is expected that the caller does the required maintenance such as freeing the table as required β so yes, you the caller are on cleanup duty, the alloc doesn't come with a free, that's your job bestie π§
now the return values, and honestly the drama of it all:
-EINVALwhen you hand it bad pointers π-ENODEVif the device is not found π-ENOMEMif there's no memory available for the operation β and note the table is not populated in that case, so don't be out here reading it π₯0if everything slayed, successful, and the table is populated π
β οΈ WARNING: It is important for the callers to ensure refreshing their copy of the table if any of the mentioned functions have been invoked in the interim. like fr fr, don't be clinging to a stale copy, that's not the vibe π
π SEE ALSO π
Kernel file ./drivers/opp/cpu.c plus these lil icons:
dev_pm_opp_free_cpufreq_table(9)dev_pm_opp_cpumask_remove_table(9)dev_pm_opp_set_sharing_cpus(9)dev_pm_opp_get_sharing_cpus(9)
okay that's the whole page, and for the cute sign-off: this icon lives in <code>./drivers/opp</code>, dated <code>October 2026</code>, under the very dramatic title <code>dev_pm_opp_...pufreq_table(9)</code> β periodt, go init some tables 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