lib: retry i2c on failure