devfreq_cooling_gen_tables(9)
π devfreq_cooling_gen_tables(9) π
okay so this is a page straight out of the Kernel API Manual (yes, the real one, devfreq_cooling_gen_tables(9), we're being fancy today β¨)
πΈ NAME πΈ
devfreq_cooling_gen_tables β literally generates a frequency table, bestie. that's the whole vibe. π
π¦ SYNOPSIS π¦
int devfreq_cooling_gen_tables (struct devfreq_cooling_device *dfc , int
num_opps );
like, that's it. two arguments. you got this. π«Ά
π ARGUMENTS π
dfcβ a pointer to the devfreq cooling device. yes, a pointer. iconic behavior honestly.num_oppsβ the number of OPPs. that's it, that's the number. π’
β DESCRIPTION β
okay so here's the tea β β this function generates a frequency table, and the frequencies in it are stored in descending order. the way that works is it means the table is indexed by cooling device state, which is the whole point.
and why, you ask? it's for compatibility with drivers which do not register an Energy Model. so like, the drivers that haven't signed up for the EM yet still get to sit with us. inclusivity slay ππ
π₯ RETURN π₯
0on success β we love a clean win π- a negative error code on failure β π not the negative error code
π SEE ALSO π
- Kernel file
./drivers/thermal/devfreq_cooling.c struct devfreq_cooling_device(9)get_perf_idx(9)of_devfreq_cooling_register_power(9)of_devfreq_cooling_register(9)devfreq_cooling_register(9)devfreq_cooling_em_register(9)devfreq_cooling_unregister(9)
like a little friend group of functions, fr fr π«Άβ¨
mwah π this page lives in ./drivers/thermal, it's dated October 2026, and it's brought to you by the Kernel API Manual β go read the source, iykyk π§ββοΈπ·
π¦ 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