zynqmp_pm_debugfs_api_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zynqmp_pm_debugfs_api_write πŸ’…

okay bestie, real talk β€” this is a page out of the Kernel API Manual, and it's about zynqmp_pm_debugfs_api_write(9). yes the name is a mouthful, no we're not renaming it, periodt. πŸŽ€


✨ NAME ✨

zynqmp_pm_debugfs_api_write β€” the debugfs write function. that's it, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

ssize_t zynqmp_pm_debugfs_api_write (struct file *file , const char
__user *ptr , size_t len , loff_t *off );

like literally look at her. icon behavior. πŸ‘‘


🧚 ARGUMENTS 🧚

  • file β€” the user file, just hanging out, being a file 🫢
  • ptr β€” the PM-API string that the user typed in (yes, from userspace, protected, careful bb) ✨
  • len β€” how long the userspace buffer is, in case you were wondering πŸ“
  • off β€” where you are inside the file, the offset, the position, the moment πŸ’«

πŸ’– DESCRIPTION πŸ’–

so what does she actually do? she's the one that triggers pm api functions, and the way you do it is genuinely so simple it's giving main character energy:

echo <pm_api_id>   > /sys/kernel/debug/zynqmp_pm/power

or, if you're feeling spicy and prefer names over numbers:

echo <pm_api_name> > /sys/kernel/debug/zynqmp_pm/power
yep, both work β€” id or name, your call, no cap. πŸ’…

πŸ”₯ RETURN πŸ”₯

  • if the PM-API request goes through β€” you get the number of bytes copied ✨ slay
  • if it doesn't β€” you get the corresponding error code 😭 not slay, but at least she told you

🌈 SEE ALSO 🌈

go read the kernel file ./drivers/firmware/xilinx/zynqmp-debug.c (iykyk πŸ’œ) and also these besties:


okay that's the whole page, mwah πŸ’‹ β€” this masterpiece lives in ./drivers/firmware/xilinx, dated October 2026, and it'll always be zynqmp_pm_debugfs_api_write(9) to us. go forth and echo responsibly, bestie πŸ“πŸ’–

πŸ“¦ where this page comes from