STRUCT SLIM_DRIVER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct slim_driver(9) ✨

okay bestie, we're in the kernel API manual and today's main character is struct slim_driver β€” the SLIMbus "generic device" (slave) device driver. think of it as the SLIMbus glow-up of spi_device on SPI, iykyk πŸ’…


✨ NAME ✨

struct slim_driver β€” the SLIMbus "generic device" (slave) device driver, which is literally the SLIMbus version of 'spi_device' on SPI πŸ¦‹


✨ SYNOPSIS ✨

struct slim_driver {
    int (*probe)(struct slim_device *sl);
    void (*remove)(struct slim_device *sl);
    void (*shutdown)(struct slim_device *sl);
    int (*device_status)(struct slim_device *sl, enum slim_device_status
s);
    struct device_driver            driver;
    const struct slim_device_id     *id_table;
 };

✨ Members ✨

πŸŽ€ the callback squad

  • probe β€” this one binds your driver to a SLIMbus device. it's giving "first meeting, instant connection" 🫢
  • remove β€” and this one unbinds your driver from the SLIMbus device. sad goodbye energy, but make it clean 😭
  • shutdown β€” the standard shutdown callback, used during powerdown/halt. it shows up when everything's wrapping up πŸ’€
  • device_status β€” this callback gets called when:
    • the device reports present and gets a laddr assigned πŸŽ‰
    • the device reports absent, or the bus goes down πŸ’”

πŸ¦‹ the fields

  • driver β€” SLIMbus device drivers should initialize the name and owner field of this structure. no cap, do it πŸ‘‘
  • id_table β€” the list of SLIMbus devices supported by this driver. it's the guest list, basically 🌈

✨ SEE ALSO ✨

kernel file ./include/linux/slimbus.h, plus struct slim_eaddr(9), enum slim_device_status(9), struct slim_device(9), struct slim_val_inf(9), struct slim_stream_config(9), and module_slim_driver(9) β€” go read them, they're iconic fr fr πŸ“šβœ¨


and that's the whole vibe check, bestie 🧚 this page came from ./include/linux and the version/date situation is October 2026 β€” so yeah, future-dated slay πŸ”₯πŸ‘‘β­ periodt πŸ’œ

πŸ“¦ where this page comes from