1I2C_ADD_NUMBERED_ADA(9) I2C and SMBus Subsystem I2C_ADD_NUMBERED_ADA(9)
2
3
4
6 i2c_add_numbered_adapter - declare i2c adapter, use static bus number
7
9 int i2c_add_numbered_adapter(struct i2c_adapter * adap);
10
12 adap
13 the adapter to register (with adap->nr initialized)
14
16 can sleep
17
19 This routine is used to declare an I2C adapter when its bus number
20 matters. For example, use it for I2C adapters from system-on-chip CPUs,
21 or otherwise built in to the system's mainboard, and where
22 i2c_board_info is used to properly configure I2C devices.
23
24 If the requested bus number is set to -1, then this function will
25 behave identically to i2c_add_adapter, and will dynamically assign a
26 bus number.
27
28 If no devices have pre-been declared for this bus, then be sure to
29 register the adapter before any dynamically allocated ones. Otherwise
30 the required bus ID may not be available.
31
32 When this returns zero, the specified adapter became available for
33 clients using the bus number provided in adap->nr. Also, the table of
34 I2C devices pre-declared using i2c_register_board_info is scanned, and
35 the appropriate driver model device nodes are created. Otherwise, a
36 negative errno value is returned.
37
39Kernel Hackers Manual 3.10 June 2019 I2C_ADD_NUMBERED_ADA(9)