1STRUCT I2C_BOARD_INF(9)     I2C and SMBus Subsystem    STRUCT I2C_BOARD_INF(9)
2
3
4

NAME

6       struct_i2c_board_info - template for device creation
7

SYNOPSIS

9       struct i2c_board_info {
10         char type[I2C_NAME_SIZE];
11         unsigned short flags;
12         unsigned short addr;
13         void * platform_data;
14         struct dev_archdata * archdata;
15       #ifdef CONFIG_OF
16       #endif
17         int irq;
18       };
19

MEMBERS

21       type[I2C_NAME_SIZE]
22           chip type, to initialize i2c_client.name
23
24       flags
25           to initialize i2c_client.flags
26
27       addr
28           stored in i2c_client.addr
29
30       platform_data
31           stored in i2c_client.dev.platform_data
32
33       archdata
34           copied into i2c_client.dev.archdata
35
36       irq
37           stored in i2c_client.irq
38

DESCRIPTION

40       I2C doesn't actually support hardware probing, although controllers and
41       devices may be able to use I2C_SMBUS_QUICK to tell whether or not
42       there's a device at a given address. Drivers commonly need more
43       information than that, such as chip type, configuration, associated
44       IRQ, and so on.
45
46       i2c_board_info is used to build tables of information listing I2C
47       devices that are present. This information is used to grow the driver
48       model tree. For mainboards this is done statically using
49       i2c_register_board_info; bus numbers identify adapters that aren't yet
50       available. For add-on boards, i2c_new_device does this dynamically with
51       the adapter already known.
52
54Kernel Hackers Manual 2.6.       November 2011         STRUCT I2C_BOARD_INF(9)
Impressum