set_scl may be ineffective before calling the driver specific prepare_recovery callback. Signed-off-by: Jan Luebbe <jluebbe@xxxxxxxxxx> --- drivers/i2c/i2c.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c index e350ac5..39837fe 100644 --- a/drivers/i2c/i2c.c +++ b/drivers/i2c/i2c.c @@ -299,6 +299,9 @@ static int i2c_generic_recovery(struct i2c_adapter *adap) if (bri->prepare_recovery) bri->prepare_recovery(adap); + bri->set_scl(adap, val); + ndelay(RECOVERY_NDELAY); + /* * By this time SCL is high, as we need to give 9 falling-rising edges */ @@ -329,7 +332,6 @@ static int i2c_generic_recovery(struct i2c_adapter *adap) int i2c_generic_scl_recovery(struct i2c_adapter *adap) { - adap->bus_recovery_info->set_scl(adap, 1); return i2c_generic_recovery(adap); } -- 2.1.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox