I2C_BOARD_INFO(9)
π 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 π
i2c_master_recv(9)i2c_master_recv_dmasafe(9)i2c_master_send(9)i2c_master_send_dmasafe(9)struct i2c_device_identity(9)enum i2c_driver_flags(9)struct i2c_driver(9)struct i2c_client(9)struct i2c_board_info(9)struct i2c_algorithm(9)struct i2c_lock_operations(9)struct i2c_timings(9)struct i2c_bus_recovery_info(9)struct i2c_adapter_quirks(9)i2c_lock_bus(9)i2c_trylock_bus(9)i2c_unlock_bus(9)i2c_mark_adapter_suspended(9)i2c_mark_adapter_resumed(9)i2c_check_quirks(9)module_i2c_driver(9)builtin_i2c_driver(9)
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
- 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