i2c_new_device - instantiate an i2c device
2. SYNOPSIS ▲
struct i2c_client * i2c_new_device(struct i2c_adapter * adap , struct i2c_board_info const * info );
3. ARGUMENTS ▲
the adapter managing the device
describes one I2C device; bus_num is ignored
4. CONTEXT ▲
5. DESCRIPTION ▲
Create an i2c device. Binding is handled through driver model probe/remove methods. A driver may be bound to this device when we return from this function, or any later moment (e.g. maybe hotplugging will load the driver module). This call is not appropriate for use by mainboard initialization logic, which usually runs during an arch_initcall long before any i2c_adapter could exist.
This returns the new i2c client, which may be saved for later use with i2c_unregister_device; or NULL to indicate an error.
6. COPYRIGHT ▲