STRUCT CDNS_ROLE_DRIVER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” 0
  • CDNS_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