device_wakeup_enable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 a struct 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:

  1. create a wakeup source object 🧚
  2. register it πŸ“
  3. 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 πŸ‘€

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