STRUCT CDNS_ROLE_DRIVER(9)
π struct cdns_role_driver(9) π
okay bestie, welcome to the struct cdns_role_driver glow-up β this is the host/gadget role driver situation, straight out of the Kernel API Manual. no cap, it's giving "small struct, big responsibilities." π
β¨ SYNOPSIS β¨
here's the whole vibe, character for character, do not touch:
struct cdns_role_driver {
int (*start)(struct cdns *cdns);
void (*stop)(struct cdns *cdns);
int (*suspend)(struct cdns *cdns, bool do_wakeup);
int (*resume)(struct cdns *cdns, bool lost_power);
const char *name;
#define CDNS_ROLE_STATE_INACTIVE 0;
#define CDNS_ROLE_STATE_ACTIVE 1;
int state;
};
likeβ¦ she's compact, she's iconic, she's literally the blueprint. π
π¦ Members π¦
startβ the callback that starts this role. wake her up, bestie, she's got things to do β¨stopβ the callback that stops this role. closing time, say bye πsuspendβ the suspend callback for this role, no notes π«Άresumeβ the resume callback for this role, and yes she comes back better than ever πΈnameβ a role name string (host/gadget). it's giving name tag energy πstateβ the current state of the role. main character status update, iykyk π
also floating around in there are the two state macros, and they are exactly:
CDNS_ROLE_STATE_INACTIVEβ0CDNS_ROLE_STATE_ACTIVEβ1
periodt. πβ¨
π SEE ALSO π
- Kernel file
./drivers/usb/cdns3/core.h struct cdns(9)
π reminder bestie: every single member above is a callback pointer or a string or an int β no invented extras, fr fr. go read the actual header before you ship anything π
okay that's the whole page, hope you slayed the vibe check π§π
β with love, from ./drivers/usb/cdns3, October 2026 π (yes that's the source/version and date, mwah π)
π¦ 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