i2c_new_device
Prev | Chapter 30. I2C and SMBus Subsystem | Next

## Name

i2c_new_device — instantiate an i2c device for use with a new style driver

## Synopsis

`struct i2c_client * i2c_new_device (` | struct i2c_adapter * | adap,
| struct i2c_board_info const * | info`)`;

## Arguments

`adap`

  the adapter managing the device

`info`

  describes one I2C device; bus_num is ignored

## Context

can sleep

## Description

Create a device to work with a new style i2c driver, where binding is handled through driver model `probe`/`remove` methods. This call is not appropriate for use by mainboad 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.

Prev | Up | Next
i2c_register_board_info | Home | i2c_unregister_device