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

NAME

6       i2c_new_secondary_device - Helper to get the instantiated secondary
7       address and create the associated device
8

SYNOPSIS

10       struct i2c_client *
11                                                    i2c_new_secondary_device(struct i2c_client * client,
12                                                    const char * name,
13                                                    u16 default_addr);
14

ARGUMENTS

16       client
17           Handle to the primary client
18
19       name
20           Handle to specify which secondary address to get
21
22       default_addr
23           Used as a fallback if no secondary address was specified
24

CONTEXT

26       can sleep
27

DESCRIPTION

29       I2C clients can be composed of multiple I2C slaves bound together in a
30       single component. The I2C client driver then binds to the master I2C
31       slave and needs to create I2C dummy clients to communicate with all the
32       other slaves.
33
34       This function creates and returns an I2C dummy client whose I2C address
35       is retrieved from the platform firmware based on the given slave name.
36       If no address is specified by the firmware default_addr is used.
37
38       On DT-based platforms the address is retrieved from the “reg” property
39       entry cell whose “reg-names” value matches the slave name.
40
41       This returns the new i2c client, which should be saved for later use
42       with i2c_unregister_device; or NULL to indicate an error.
43
45Kernel Hackers Manual 3.10         June 2019           I2C_NEW_SECONDARY_DE(9)
Impressum