struct i2c_client
Prev | Chapter 27. I2C and SMBus Subsystem | Next

## Name

struct i2c_client — represent an I2C slave device

## Synopsis

    struct i2c_client {
      unsigned short flags;
      unsigned short addr;
      char name[I2C_NAME_SIZE];
      struct i2c_adapter * adapter;
      struct i2c_driver * driver;
      struct device dev;
      int irq;
      char driver_name[KOBJ_NAME_LEN];
      struct list_head list;
      struct completion released;
    };

## Members

flags

  I2C_CLIENT_TEN indicates the device uses a ten bit chip address; I2C_CLIENT_PEC indicates it uses SMBus Packet Error Checking

addr

  Address used on the I2C bus connected to the parent adapter.

name[I2C_NAME_SIZE]

  Indicates the type of the device, usually a chip name that's generic enough to hide second-sourcing and compatible revisions.

adapter

  manages the bus segment hosting this I2C device

driver

  device's driver, hence pointer to access routines

dev

  Driver model device node for the slave.

irq

  indicates the IRQ generated by this device (if any)

driver_name[KOBJ_NAME_LEN]

  Identifies new-style driver used with this device; also used as the module name for hotplug/coldplug modprobe support.

list

  list of active/busy clients (DEPRECATED)

released

  used to synchronize client releases & detaches and references

## Description

An i2c_client identifies a single device (i.e. chip) connected to an i2c bus. The behaviour exposed to Linux is defined by the driver managing the device.

Prev | Up | Next
Chapter 27. I2C and SMBus Subsystem | Home | struct i2c_board_info