STRUCT SERDEV_DEVICE(9)
πΈ 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 byserdev_device_writeinternally. 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 π¦
- Kernel file
./include/linux/serdev.h struct serdev_device_ops(9)struct serdev_device_driver(9)struct serdev_controller(9)serdev_device_put(9)serdev_controller_put(9)serdev_device_driver_unregister(9)
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
- 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