device_set_wakeup_capable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– device_set_wakeup_capable(9) πŸ’–

okay so we’re in the Kernel API Manual today, bestie, and the main character is device_set_wakeup_capable(9). It’s giving β€œtoggle the wakeup vibe” and we’re gonna get into it. πŸ’…

πŸŽ€ NAME πŸŽ€

device_set_wakeup_capable β€” Set/reset device wakeup capability flag.

✨ SYNOPSIS ✨

void device_set_wakeup_capable (struct device *dev , bool capable );

🫢 ARGUMENTS 🫢

  • dev β€” Device to handle.
  • capable β€” Whether or not dev is capable of waking up the system from sleep.

πŸ’… DESCRIPTION πŸ’…

If capable is set, set dev’s power.can_wakeup flag and add its wakeup-related attributes to sysfs. Otherwise, unset dev’s power.can_wakeup flag and remove its wakeup-related attributes from sysfs.

⚠️ This function may sleep, and it can’t be called from any context where sleeping is not allowed. Periodt. 😭

🌈 SEE ALSO 🌈

Kernel file ./drivers/base/power/wakeup.c β€” plus the whole squad: 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_enable(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_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).


okay that’s the whole page, bestie β€” signing off from the ./drivers/base/power source/version, October 2026 edition. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from