STRUCT AUXILIARY_DRIVER(9)
π 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 β
- Kernel file
./include/linux/auxiliary_bus.h DEVICE_LIFESPAN(9)struct auxiliary_device(9)module_auxiliary_driver(9)
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
- 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