I2C_BOARD_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… I2C_BOARD_INFO(9) β€” like, the official Kernel API Manual page, bestie

okay so picture this: it's a kernel API manual page, the section is 9, and the whole entire vibe is I2C_BOARD_INFO β€” the macro you use to list out an i2c device and its address. that's it, that's the page. iconic. let's get into it πŸŽ€


✨ NAME ✨

I2C_BOARD_INFO β€” the macro that lists an i2c device and its address. literally its whole job. πŸ¦‹


🌸 SYNOPSIS 🌸

I2C_BOARD_INFO (dev_type , dev_addr );

yes bestie, that comma-space thing is real, don't come for me, just copy it exactly 😭


πŸ’– ARGUMENTS πŸ’–

  • dev_type β€” this one identifies the device type. that's the whole description. it tells you what the thing is 🫢
  • dev_addr β€” and this is the device's address on the bus. where to find it. its little home address on the I2C street 🏑✨

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's the tea: this macro initializes the essential fields of a struct i2c_board_info, and what it's doing is declaring what has been provided on a particular board. like, "hey, this board has this device at this address, mmkay?" πŸ’…

and the extra stuff? the optional fields β€” think the associated irq, or device-specific platform_data β€” those don't go through this macro. nope. you provide those using conventional syntax. so go off with your normal struct-initializer ways, the macro's only handling the essentials. no cap πŸ”₯


πŸ” SEE ALSO πŸ”

the kernel file ./include/linux/i2c.h is the source of truth here, and then there's a whole friend group of references, so let me just list every single one because i love you and i wouldn't skip a single bestie πŸ’œ

ngl, that's a lot of reading. but the struct i2c_board_info(9) one is lowkey the main character here since that's the struct this macro is initializing. iykyk 🌈

🧚 sign-off 🧚

this flawless little page lives in ./include/linux, it's dated October 2026, and the whole thing is filed under I2C_BOARD_INFO(9) β€” stay slay, stay sus-free, and go initialize those essential fields, periodt. πŸ’…πŸ’–β­πŸ™ˆ

πŸ“¦ where this page comes from