Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
i2c_board_info Struct Reference

#include <i2c.h>

Data Fields

char type [I2C_NAME_SIZE]
unsigned short flags
unsigned short addr
struct dev_archdataarchdata
struct device_nodeof_node
int irq

Detailed Description

struct i2c_board_info - template for device creation : chip type, to initialize : to initialize i2c_client.flags : stored in i2c_client.addr : stored in : copied into : pointer to OpenFirmware device node : stored in i2c_client.irq

I2C doesn't actually support hardware probing, although controllers and devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's a device at a given address. Drivers commonly need more information than that, such as chip type, configuration, associated IRQ, and so on.

i2c_board_info is used to build tables of information listing I2C devices that are present. This information is used to grow the driver model tree. For mainboards this is done statically using i2c_register_board_info(); bus numbers identify adapters that aren't yet available. For add-on boards, i2c_new_device() does this dynamically with the adapter already known.

Definition at line 275 of file i2c.h.

Field Documentation

unsigned short addr

Definition at line 278 of file i2c.h.

struct dev_archdata* archdata

Definition at line 280 of file i2c.h.

unsigned short flags

Definition at line 277 of file i2c.h.

int irq

Definition at line 282 of file i2c.h.

struct device_node* of_node

Definition at line 281 of file i2c.h.

Definition at line 279 of file i2c.h.

Definition at line 276 of file i2c.h.

The documentation for this struct was generated from the following file: