dev_pm_opp_...pufreq_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

  • -EINVAL when you hand it bad pointers πŸ™ˆ
  • -ENODEV if the device is not found 😭
  • -ENOMEM if 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 πŸ”₯
  • 0 if 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:


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