of_genpd_remove_last(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so welcome to the Kernel API Manual bestie πŸ’– β€” this page is of_genpd_remove_last(9), and what it does is literally right there in the name: Remove the last PM domain registered for a provider. slay.


🌸 SYNOPSIS 🌸

struct generic_pm_domain * of_genpd_remove_last (struct device_node *np
);

that's the whole signature, no cap πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • np β€” a pointer to the device node that's associated with the provider 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: it goes and finds the last PM domain that a particular provider added, and then it removes that PM domain from the list of PM domains. the provider gets identified by the 'provider' device structure that gets passed in πŸ‘‘

and here's the ✨important caveat✨ (do not skip this, i'm serious): the PM domain will only be removed if the provider associated with the domain has been removed. like, that's the condition. no provider-removal, no domain-removal. periodt. πŸ™ˆ

on the way out it returns a valid pointer to struct generic_pm_domain on success, or ERR_PTR on failure. so like... check your pointers, bestie 😭


πŸ’œ SEE ALSO πŸ’œ

here's the whole friend group 🫢 first up, the actual source:

  • Kernel file ./drivers/pmdomain/core.c

and now the roll call (all (9), obviously):

dev_pm_genpd_set_performance_state(9), dev_pm_genpd_set_next_wakeup(9), dev_pm_genpd_get_next_hrtimer(9), dev_pm_genpd_set_hwmode(9), dev_pm_genpd_get_hwmode(9), dev_pm_genpd_rpm_always_on(9), dev_pm_genpd_is_on(9), pm_genpd_inc_rejected(9), genpd_queue_power_off_work(9), genpd_power_off(9), genpd_power_on(9), genpd_power_off_work_fn(9), __genpd_runtime_suspend(9), __genpd_runtime_resume(9), genpd_runtime_suspend(9), genpd_runtime_resume(9), genpd_power_off_unused(9), genpd_sync_power_off(9), genpd_sync_power_on(9)

still going, they're all iconic πŸ‘‘

genpd_prepare(9), genpd_finish_suspend(9), genpd_suspend_noirq(9), genpd_finish_resume(9), genpd_resume_noirq(9), genpd_freeze_noirq(9), genpd_thaw_noirq(9), genpd_poweroff_noirq(9), genpd_restore_noirq(9), genpd_complete(9), dev_pm_genpd_suspend(9), dev_pm_genpd_resume(9), pm_genpd_add_device(9), pm_genpd_remove_device(9), dev_pm_genpd_add_notifier(9), dev_pm_genpd_remove_notifier(9), pm_genpd_add_subdomain(9), pm_genpd_remove_subdomain(9), pm_genpd_init(9), pm_genpd_remove(9), struct of_genpd_provider(9)

okay we're in the of_ era now, stay with me πŸ’€

genpd_xlate_simple(9), genpd_xlate_onecell(9), genpd_add_provider(9), of_genpd_add_provider_simple(9), of_genpd_add_provider_onecell(9), of_genpd_del_provider(9), genpd_get_from_provider(9), of_genpd_add_child_ids(9), of_genpd_remove_child_ids(9), of_genpd_add_device(9), of_genpd_add_subdomain(9), of_genpd_remove_subdomain(9), genpd_dev_pm_detach(9), genpd_dev_pm_attach(9), genpd_dev_pm_attach_by_id(9), genpd_dev_pm_attach_by_name(9), of_genpd_parse_idle_states(9), of_genpd_sync_state(9)

and that's the whole squad, no one left behind πŸ§šπŸ’–


ngl the "only removed if the provider has been removed" bit is the main character of this page β€” respect it or your PM domain is staying right where it is 😭

byeee bestie πŸ¦‹ this page lives in the ./drivers/pmdomain source drop, dated October 2026 β€” go read the code, ily, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from