Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: algo-bit: add I2C_AQ_NO_CLK_STRETCH

Add I2C_AQ_NO_CLK_STRETCH to drivers/i2c/algos/i2c-algo-bit.c when getscl
is not available.

Signed-off-by: Nicola Corna <nicola@corna.info>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

authored by

Nicola Corna and committed by
Wolfram Sang
a94d306b 749de3da

+6
+6
drivers/i2c/algos/i2c-algo-bit.c
··· 617 617 }; 618 618 EXPORT_SYMBOL(i2c_bit_algo); 619 619 620 + const struct i2c_adapter_quirks i2c_bit_quirk_no_clk_stretch = { 621 + .flags = I2C_AQ_NO_CLK_STRETCH, 622 + }; 623 + 620 624 /* 621 625 * registering functions to load algorithms at runtime 622 626 */ ··· 639 635 /* register new adapter to i2c module... */ 640 636 adap->algo = &i2c_bit_algo; 641 637 adap->retries = 3; 638 + if (bit_adap->getscl == NULL) 639 + adap->quirks = &i2c_bit_quirk_no_clk_stretch; 642 640 643 641 ret = add_adapter(adap); 644 642 if (ret < 0)