STRUCT DWC2_GREGS_BACKUP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct dwc2_gregs_backup(9) πŸ’–

okay bestie, welcome to the Kernel API Manual β€” this page is literally all about struct dwc2_gregs_backup, and it is exactly what it sounds like: a little safe deposit box for the global registers state, kept around so you can put everything back the way it was before you go into partial power down. 🫢


✨ NAME ✨

struct dwc2_gregs_backup β€” holds the global registers state before entering partial power down.

like, it's the screenshot you take of the registers before you yeet the hardware into low-power mode. no cap. πŸ“Έ


πŸŽ€ SYNOPSIS πŸŽ€

struct dwc2_gregs_backup {
    u32 gintsts;
    u32 gotgctl;
    u32 gintmsk;
    u32 gahbcfg;
    u32 gusbcfg;
    u32 grxfsiz;
    u32 gnptxfsiz;
    u32 gi2cctl;
    u32 glpmcfg;
    u32 pcgcctl;
    u32 pcgcctl1;
    u32 gdfifocfg;
    u32 gpwrdn;
    bool valid;
 };

iconic struct, honestly. tysm for your service. πŸ’…


🌸 Members 🌸

okay so every single field is a backup of one register, and then there's valid doing the vibe check. here we go:

  • gintsts β€” the backup of the GINTSTS register. yes queen, preserve those interrupt statuses. ⭐
  • gotgctl β€” the backup of the GOTGCTL register.
  • gintmsk β€” the backup of the GINTMSK register. your interrupt masks, safely tucked in. πŸ’œ
  • gahbcfg β€” the backup of the GAHBCFG register.
  • gusbcfg β€” the backup of the GUSBCFG register.
  • grxfsiz β€” the backup of the GRXFSIZ register.
  • gnptxfsiz β€” the backup of the GNPTXFSIZ register.
  • gi2cctl β€” the backup of the GI2CCTL register.
  • glpmcfg β€” the backup of the GLPMCFG register.
  • pcgcctl β€” the backup of the PCGCCTL register.
  • pcgcctl1 β€” the backup of the PCGCCTL1 register.
  • gdfifocfg β€” the backup of the GDFIFOCFG register.
  • gpwrdn β€” the backup of the GPWRDN register.
  • valid β€” a bool, true if the register values are backuped. yup, that's the flag that tells you the save file actually got written. πŸ’Ύβœ¨

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/usb/dwc2/core.h β€” and the whole friend group:

  • struct dwc2_hsotg_ep(9)
  • struct dwc2_hsotg_req(9)
  • struct dwc2_core_params(9)
  • struct dwc2_hw_params(9)
  • struct dwc2_dregs_backup(9)
  • struct dwc2_hregs_backup(9)
  • struct dwc2_hsotg(9)

ngl, read the others too β€” struct dwc2_dregs_backup(9) and struct dwc2_hregs_backup(9) are literally this struct's siblings, iykyk. 🧚

that's the whole page, bestie β€” sourced straight from ./drivers/usb/dwc2, dated October 2026, and filed under struct dwc2_gregs_backup(9). go forth and back up those global registers. πŸŒˆπŸ‘‘πŸ”₯

πŸ“¦ where this page comes from