STRUCT AUXILIARY_DRIVER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct auxiliary_driver(9) πŸ’–

okay bestie, welcome to the Kernel API Manual β€” this is the page about struct auxiliary_driver, and yes it's giving main character energy in the driver world πŸŽ€


✨ NAME ✨

struct auxiliary_driver β€” the literal definition of an auxiliary bus driver πŸ’…


✨ SYNOPSIS ✨

struct auxiliary_driver {
    int (*probe)(struct auxiliary_device *auxdev, const struct
auxiliary_device_id *id);
    void (*remove)(struct auxiliary_device *auxdev);
    void (*shutdown)(struct auxiliary_device *auxdev);
    int (*suspend)(struct auxiliary_device *auxdev, pm_message_t state);
    int (*resume)(struct auxiliary_device *auxdev);
    const char *name;
    struct device_driver driver;
    const struct auxiliary_device_id *id_table;
 };

🌸 Members 🌸

so this struct is basically a little friend group of function pointers and fields, and every single one is iconic in its own way 🫢

  • probe β€” gets called when a matching device is added to the bus ✨ like, "ooh a new device, lemme check it out".
  • remove β€” gets called when the device is removed from the bus 😭 the sad goodbye function.
  • shutdown β€” gets called at shut-down time to quiesce the device πŸ’€ quiet down, bestie, we're powering off.
  • suspend β€” gets called to put the device into sleep mode πŸŒ™ usually to a power state. nap time fr fr.
  • resume β€” gets called to bring a device back from sleep mode β˜€οΈ wakey wakey.
  • name β€” the driver name πŸŽ€ literally its whole identity.
  • driver β€” the core driver structure πŸ‘‘ the foundation underneath it all.
  • id_table β€” the table of devices this driver should match on the bus πŸ’– the guest list, basically.

πŸ¦‹ Description πŸ¦‹

Auxiliary drivers follow the standard driver model convention β€” meaning discovery/enumeration is handled by the core, and the drivers themselves provide probe and remove methods ✨. That's the whole vibe: core does the finding, driver does the reacting.

They also support power management and shutdown notifications using the standard conventions 🌈.

Auxiliary drivers register themselves with the bus by calling auxiliary_driver_register πŸ“ž. The id_table contains the match_names of auxiliary devices that a driver can bind with πŸ”—.

static const struct auxiliary_device_id my_auxiliary_id_table[] = {
        { .name = "foo_mod.foo_dev" },
        {},
};

MODULE_DEVICE_TABLE(auxiliary, my_auxiliary_id_table);

struct auxiliary_driver my_drv = {
        .name = "myauxiliarydrv",
        .id_table = my_auxiliary_id_table,
        .probe = my_drv_probe,
        .remove = my_drv_remove
};

like, this is THE example. memorize it, screenshot it, send it to the group chat πŸ“Έ iykyk.


⭐ SEE ALSO ⭐


okay that's the whole page bestie, you ate that πŸ’… no cap. this one's from the ./include/linux source, version vibes of October 2026, and it's officially a struct auxiliary_driver(9) moment πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from