devm_devfreq_add_device(9)
π devm_devfreq_add_device β the Kernel API Manual page you didn't know you needed π
okay so like, real talk bestie, this is a page straight out of the Kernel API Manual and it's about devm_devfreq_add_device, which is the resource-managed glow-up of devfreq_add_device(). it's giving "I handle the cleanup so you don't have to" energy and honestly? obsessed. β¨
πΈ NAME πΈ
devm_devfreq_add_device β the resource-managed version of devfreq_add_device(), no cap π«Ά
β¨ SYNOPSIS β¨
struct devfreq * devm_devfreq_add_device (struct device *dev , struct
devfreq_dev_profile *profile , const char *governor_name , void *data );
like, it hands you back a struct devfreq *, that's the whole vibe π
π ARGUMENTS π
devβ the device that's getting the devfreq feature added to it. this is your main character device fr.profileβ the device-specific profile that devfreq is gonna run. it's the personality of the device, iykyk.governor_nameβ the name of the policy that chooses the frequency. yes bestie, name β it's aconst char *, not the governor itself.dataβ the devfreq driver passes this along to the governors, and the governor should not change it. hands off π«
π¦ DESCRIPTION π¦
so what this function does is it manages the memory of the devfreq device automatically using device resource management β like it just handles it for you β and it simplifies the free operation for the memory of the devfreq device. literally the "don't worry about it, I got u" friend of kernel APIs π
no manual cleanup arc for you. it's already handled. slay. β¨
π₯ SEE ALSO π₯
okay this list is LONG and honestly iconic for it. here's every single one, in the exact order, because we do not skip entries in this house π
Kernel file ./drivers/devfreq/devfreq.c, plus:
find_device_devfreq(9)devfreq_get_freq_range(9)devfreq_get_freq_level(9)devfreq_update_status(9)find_devfreq_governor(9)try_then_request_governor(9)devfreq_update_target(9)update_devfreq(9)devfreq_monitor(9)devfreq_monitor_start(9)devfreq_monitor_stop(9)devfreq_monitor_suspend(9)devfreq_monitor_resume(9)devfreq_update_interval(9)devfreq_notifier_call(9)qos_notifier_call(9)qos_min_notifier_call(9)qos_max_notifier_call(9)devfreq_dev_release(9)devfreq_add_device(9)devfreq_remove_device(9)devm_devfreq_remove_device(9)devfreq_suspend_device(9)devfreq_resume_device(9)devfreq_suspend(9)devfreq_resume(9)devfreq_add_governor(9)devm_devfreq_add_governor(9)devfreq_remove_governor(9)devfreq_summary_show(9)devfreq_recommended_opp(9)devfreq_register_opp_notifier(9)devfreq_unregister_opp_notifier(9)devm_devfreq_register_opp_notifier(9)devm_devfreq_unregister_opp_notifier(9)devfreq_register_notifier(9)devm_devfreq_register_notifier(9)devm_devfreq_unregister_notifier(9)
bestie that is thirty-eight cross-references. thirty-eight. whoever wrote this page said "I will not be gatekeeping" and honestly? respect. π
and that's the page!! this whole thing lives under ./drivers/devfreq, it's dated October 2026, and the header you'd normally see up top is devm_devfreq_add_device(9) β so yeah, that's your sign-off bestie. go read some devfreq source, you're gonna eat π
β¨π
π¦ 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