1I2C_REGISTER_BOARD_I(9)     I2C and SMBus Subsystem    I2C_REGISTER_BOARD_I(9)
2
3
4

NAME

6       i2c_register_board_info - statically declare I2C devices
7

SYNOPSIS

9       int i2c_register_board_info(int busnum,
10                                   struct i2c_board_info const * info,
11                                   unsigned len);
12

ARGUMENTS

14       busnum
15           identifies the bus to which these devices belong
16
17       info
18           vector of i2c device descriptors
19
20       len
21           how many descriptors in the vector; may be zero to reserve the
22           specified bus number.
23

DESCRIPTION

25       Systems using the Linux I2C driver stack can declare tables of board
26       info while they initialize. This should be done in board-specific init
27       code near arch_initcall time, or equivalent, before any I2C adapter
28       driver is registered. For example, mainboard init code could define
29       several devices, as could the init code for each daughtercard in a
30       board stack.
31
32       The I2C devices will be created later, after the adapter for the
33       relevant bus has been registered. After that moment, standard driver
34       model tools are used to bind “new style” I2C drivers to the devices.
35       The bus number for any device declared using this routine is not
36       available for dynamic allocation.
37
38       The board info passed can safely be __initdata, but be careful of
39       embedded pointers (for platform_data, functions, etc) since that won't
40       be copied.
41
43Kernel Hackers Manual 3.10         June 2019           I2C_REGISTER_BOARD_I(9)
Impressum