STRUCT DWC2_GREGS_BACKUP(9)
π 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 theGINTSTSregister. yes queen, preserve those interrupt statuses. βgotgctlβ the backup of theGOTGCTLregister.gintmskβ the backup of theGINTMSKregister. your interrupt masks, safely tucked in. πgahbcfgβ the backup of theGAHBCFGregister.gusbcfgβ the backup of theGUSBCFGregister.grxfsizβ the backup of theGRXFSIZregister.gnptxfsizβ the backup of theGNPTXFSIZregister.gi2cctlβ the backup of theGI2CCTLregister.glpmcfgβ the backup of theGLPMCFGregister.pcgcctlβ the backup of thePCGCCTLregister.pcgcctl1β the backup of thePCGCCTL1register.gdfifocfgβ the backup of theGDFIFOCFGregister.gpwrdnβ the backup of theGPWRDNregister.validβ abool, 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)andstruct 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms