module_i2c_driver(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, this is module_i2c_driver(9) from the Kernel API Manual, and it's the helper macro that registers a modular I2C driver. literally the β€œmake it official” button for your I2C driver era. πŸ’–


✨ NAME ✨

module_i2c_driver β€” Helper macro for registering a modular I2C driver. periodt. πŸ’…


🌸 SYNOPSIS 🌸

module_i2c_driver (__i2c_driver );

πŸ’… ARGUMENTS πŸ’…

  • __i2c_driver β€” the i2c_driver struct. that's the whole argument, bestie. 🫢

πŸŽ€ DESCRIPTION πŸŽ€

This macro is for I2C drivers that do not do anything special in module init/exit. it's giving β€œdelete the boilerplate, keep the vibes” because it eliminates a lot of boilerplate. ✨

important: each module may only use this macro once, and calling it replaces module_init and module_exit. no cap, that's the rule. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/i2c.h is the neighborhood, and these are the linked besties:


mwah πŸ’‹ β€” source/version: ./include/linux, date: October 2026, module_i2c_driver(9) era. byeee πŸ¦‹

πŸ“¦ where this page comes from