Message ID | 20180614012714.5937-2-wsa+renesas@sang-engineering.com (mailing list archive) |
---|---|
State | Under Review |
Delegated to: | Geert Uytterhoeven |
Headers | show |
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index 3df0efd69ae3..c76cf51975d0 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c @@ -650,9 +650,8 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap, adap->quirks = &i2c_bit_quirk_no_clk_stretch; /* Bring bus to a known state. Looks like STOP if bus is not free yet */ - setscl(bit_adap, 1); - udelay(bit_adap->udelay); - setsda(bit_adap, 1); + sclhi(bit_adap); + sdahi(bit_adap); ret = add_adapter(adap); if (ret < 0)
When using the generic functions for setting SCL/SDA high, we make sure necessary delays are met. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- drivers/i2c/algos/i2c-algo-bit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)