---
name: "struct_i2c_bus_recovery_info"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/struct_i2c_bus_recovery_info"
---

# struct\_i2c\_bus\_recovery\_info(9)

I2C bus recovery information

## NAME

struct\_i2c\_bus\_recovery\_info - I2C bus recovery information

## SYNOPSIS

```
struct i2c_bus_recovery_info {
  int (* recover_bus) (struct i2c_adapter *);
  int (* get_scl) (struct i2c_adapter *);
  void (* set_scl) (struct i2c_adapter *, int val);
  int (* get_sda) (struct i2c_adapter *);
  void (* prepare_recovery) (struct i2c_bus_recovery_info *bri);
  void (* unprepare_recovery) (struct i2c_bus_recovery_info *bri);
  int scl_gpio;
  int sda_gpio;
};
```

## MEMBERS

recover\_bus

Recover routine. Either pass driver's **recover\_bus** routine, or **i2c\_generic\_scl\_recovery** or **i2c\_generic\_gpio\_recovery**.

get\_scl

This gets current value of SCL line. Mandatory for generic SCL recovery. Used internally for generic GPIO recovery.

set\_scl

This sets/clears SCL line. Mandatory for generic SCL recovery. Used internally for generic GPIO recovery.

get\_sda

This gets current value of SDA line. Optional for generic SCL recovery. Used internally, if sda\_gpio is a valid GPIO, for generic GPIO recovery.

prepare\_recovery

This will be called before starting recovery. Platform may configure padmux here for SDA/SCL line or something else they want.

unprepare\_recovery

This will be called after completing recovery. Platform may configure padmux here for SDA/SCL line or something else they want.

scl\_gpio

gpio number of the SCL line. Only required for GPIO recovery.

sda\_gpio

gpio number of the SDA line. Only required for GPIO recovery.

## COPYRIGHT
