acpi_device_set_power(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… acpi_device_set_power(9)

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes, that Kernel API Manual β€” and today's main character is acpi_device_set_power(9). she sets power states on ACPI devices and she's lowkey iconic for it. let's get into it πŸŽ€


🌸 NAME 🌸

acpi_device_set_power β€” set the power state of an ACPI device, no cap πŸ’…


✨ SYNOPSIS ✨

int acpi_device_set_power (struct acpi_device *device , int state );

like, that's the whole vibe. it returns an int and takes two things. slay 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • device β€” the device whose power state you're about to change. the one getting the glow-up ✨
  • state β€” the shiny new power state you wanna set it to. the new era, if you will πŸ‘‘

🧚 DESCRIPTION 🧚

so here's the tea, and it's kind of important, so listen up πŸ“ β€” callers must make sure the device is power manageable before they use this function. that's not a suggestion, that's the rule. check first, then call. periodt πŸ’€

fr fr do the power-manageable check before you call this. nobody wants a device that can't even do power states getting asked to do power states 😭

⭐ SEE ALSO ⭐

the whole friend group 🫢 β€” and heads up, the kernel file lives at ./drivers/acpi/device_pm.c:


πŸ’– and that's the page!! πŸ’–

cute little sign-off bestie: this one comes from the source dir ./drivers/acpi, and it's dated October 2026 🌈 so yeah, she's fresh, she's documented, she's acpi_device_set_power(9). go forth and set those power states responsibly πŸ§šβ€β™€οΈπŸ’œβ­

πŸ“¦ where this page comes from