struct i2c_bus_recovery_info — I2C bus recovery information
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_adapter *);
void (* unprepare_recovery) (struct i2c_adapter *);
int scl_gpio;
int sda_gpio;
};
Recover routine. Either pass driver's recover_bus routine, or
i2c_generic_scl_recovery or i2c_generic_gpio_recovery.
This gets current value of SCL line. Mandatory for generic SCL recovery. Used internally for generic GPIO recovery.
This sets/clears SCL line. Mandatory for generic SCL recovery. Used internally for generic GPIO recovery.
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.
This will be called before starting recovery. Platform may configure padmux here for SDA/SCL line or something else they want.
This will be called after completing recovery. Platform may configure padmux here for SDA/SCL line or something else they want.
gpio number of the SCL line. Only required for GPIO recovery.
gpio number of the SDA line. Only required for GPIO recovery.