debugfs_print_regs32(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… debugfs_print_regs32 β€” NAME ✨

ok so bestie, debugfs_print_regs32 is literally the function that uses seq_print to describe a set of registers πŸŽ€. that's the whole vibe. it prints out a whole text block describing what's currently sitting in your 32-bit hardware registers, no cap.


🌸 SYNOPSIS 🌸

void debugfs_print_regs32 (struct seq_file *s , const struct
       debugfs_reg32 *regs , int nregs , void __iomem *base , char *prefix );

that's the whole signature, copy it exactly, don't @ me πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • s β€” the seq_file structure that's being used to generate the output. it's the main character of the printing process, honestly πŸ‘‘
  • regs β€” an array if struct debugfs_reg32 structures. yes, the original says "an array if" and i'm not gonna fix it, that's just how it is 😭 (it's an array of those structs, iykyk)
  • nregs β€” the length of the above array. so like, how many of those bad boys you're passing in πŸ”₯
  • base β€” the base address that gets used when reading the registers. the starting point, the origin story, the home base 🏠
  • prefix β€” a string that gets prefixed to every single output line. every. line. πŸ’–

✨ DESCRIPTION ✨

okay so here's the tea πŸ“: this function outputs a text block describing the current values of some 32-bit hardware registers.

it's meant to be used inside debugfs files that are based on seq_file, specifically the ones that need to show registers β€” and it can be intermixed with other information too, so you're not locked into registers-only content, you can sprinkle them in like little facts ✨

now the prefix argument, bestie, this one's lowkey important 🫢: it may be used to specify a leading string. why? because some peripherals have several blocks of identical registers β€” like, for example, the configuration of dma channels πŸŽ€. so without a prefix you'd have no idea which identical-looking block you're actually looking at, and that's giving chaos πŸ’€. prefix saves you. prefix is the icon.


πŸ‘‘ SEE ALSO πŸ‘‘

okay the full reference list, and yes i'm listing every single one because we don't skip entries in this house πŸ’œ

Kernel file ./fs/debugfs/file.c and also:

like, that's the whole friend group right there 🌈


this page lives in the Kernel API Manual β€” that's the manual name, folding it in here so you have it 🫢

and that's the page, bestie!! 🌸 this very manual came from the source ./fs/debugfs, and it's dated October 2026 β€” so yeah, it's from the future, we stan a forward-thinking manpage πŸ§šπŸ’– periodt ✨

πŸ“¦ where this page comes from