device_wakeup_enable(9)
π device_wakeup_enable(9) β the Kernel API Manual, bestie edition β¨
okay so you've wandered into a section 9 manpage, which means we're deep in kernel API territory, and the star of this page is device_wakeup_enable β literally the function that lets a device be a wakeup source. yes, like, the thing that wakes your whole machine up. main character energy fr fr πΈ
β¨ NAME β¨
device_wakeup_enable β Enable given device to be a wakeup source. π
Likeβ¦ that's it. That's the whole job. You give it a device and it goes "sure babe, you can wake me up" π
π SYNOPSIS π
int device_wakeup_enable (struct device *dev );
ngl, the return type is int and the arg is a struct device * β copy it exactly when you're writing your code, bestie, don't get creative with it π
π¦ ARGUMENTS π¦
devβ Device to handle. that's your lil guy. the device you're working with. give it astruct device *and off you go π
π DESCRIPTION π
Okay so here's what actually goes down: it creates a wakeup source object, registers it, and attaches it to dev. β¨
Three steps, one function call, no cap:
- create a wakeup source object π§
- register it π
- attach it to
devπ
and that's it! that's the whole vibe. your device is now a wakeup source. slay π
π SEE ALSO π
okay this is the long part and I am NOT skipping a single one of these, because every single reference is part of the lore π«Ά also: the kernel file lives at ./drivers/base/power/wakeup.c β that's where the magic is, iykyk π
wakeup_source_create(9)wakeup_source_destroy(9)wakeup_source_add(9)wakeup_source_remove(9)wakeup_source_register(9)wakeup_source_unregister(9)wakeup_sources_read_lock(9)wakeup_sources_read_unlock(9)wakeup_sources_walk_start(9)wakeup_sources_walk_next(9)device_wakeup_attach(9)device_wakeup_attach_irq(9)device_wakeup_detach_irq(9)device_wakeup_arm_wake_irqs(9)device_wakeup_disarm_wake_irqs(9)device_wakeup_detach(9)device_wakeup_disable(9)device_set_wakeup_capable(9)device_set_wakeup_enable(9)wakeup_source_not_usable(9)wakeup_source_activate(9)wakeup_source_report_event(9)__pm_stay_awake(9)pm_stay_awake(9)wakeup_source_deactivate(9)__pm_relax(9)pm_relax(9)pm_wakeup_timer_fn(9)pm_wakeup_ws_event(9)pm_wakeup_dev_event(9)pm_wakeup_pending(9)pm_get_wakeup_count(9)pm_save_wakeup_count(9)pm_wakep_autosleep_enabled(9)print_wakeup_source_stats(9)wakeup_sources_stats_seq_show(9)bpf_wakeup_sources_read_lock(9)bpf_wakeup_sources_read_unlock(9)bpf_wakeup_sources_get_head(9)
that's the whole friend group right there π read them, love them, walk them like wakeup_sources_walk_next(9) walks the list π₯
β reminder: keep those function names exactly as written β they're identifiers, not vibes, and the kernel will absolutely not forgive a typo π
and that's the page!! π this edition came from ./drivers/base/power, dated October 2026, page device_wakeup_enable(9) β mwah, go enable some wakeup sources bestie, you got this πβ¨π¦
π¦ 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