STRUCT SERDEV_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so this is struct serdev_device(9), straight out of the Kernel API Manual, and it's the basic representation of an serdev device β€” yes, β€œan serdev,” we're keeping the grammar exactly as the kernel wrote it πŸ’…. Think of it as the main-character struct for a serdev device, and we're about to meet every single member, no skipping, fr fr, periodt.

✨ SYNOPSIS ✨

here's the whole struct, copied exactly so you can vibe-check it:

       struct serdev_device {
           struct device dev;
           int nr;
           struct serdev_controller *ctrl;
           const struct serdev_device_ops *ops;
           struct completion write_comp;
           struct mutex write_lock;
        };

πŸŽ€ Members πŸŽ€

  • dev β€” the driver model representation of the device. literally the driver-model selfie of this device.
  • nr β€” the device number on the serdev bus. your little bus ID, iconic.
  • ctrl β€” the serdev controller managing this device. the controller is the one holding the aux cord here 🎧.
  • ops β€” the device operations. all the things this device can do, gathered up.
  • write_comp β€” a completion used by serdev_device_write internally. it's for internal write-completion business, iykyk.
  • write_lock β€” a lock to serialize access when writing data. it's giving responsible-roommate energy so the writes don't just chaotically overlap, bestie.

πŸ¦‹ SEE ALSO πŸ¦‹

xoxo, your kernel bestie πŸ’– this page is from source path ./include/linux, dated October 2026, and it's literally the struct serdev_device(9) page β€” see you in the next manpage, slay 🫢

πŸ“¦ where this page comes from