diff options
author | Nicola Corna <nicola@corna.info> | 2015-10-29 12:34:24 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-11-30 18:37:25 +0100 |
commit | a94d306b71a5202cb928a7a1328dedab4fe0e968 (patch) | |
tree | 3f5fab1ee6e2e9a06561576c21c100970af205c0 /drivers/i2c | |
parent | 749de3dac5e4d65cbed3b58f89c56883e31d1a5a (diff) | |
download | talos-op-linux-a94d306b71a5202cb928a7a1328dedab4fe0e968.tar.gz talos-op-linux-a94d306b71a5202cb928a7a1328dedab4fe0e968.zip |
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/algos/i2c-algo-bit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index 899bede81b31..9d233bbde5e1 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c @@ -617,6 +617,10 @@ const struct i2c_algorithm i2c_bit_algo = { }; EXPORT_SYMBOL(i2c_bit_algo); +const struct i2c_adapter_quirks i2c_bit_quirk_no_clk_stretch = { + .flags = I2C_AQ_NO_CLK_STRETCH, +}; + /* * registering functions to load algorithms at runtime */ @@ -635,6 +639,8 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap, /* register new adapter to i2c module... */ adap->algo = &i2c_bit_algo; adap->retries = 3; + if (bit_adap->getscl == NULL) + adap->quirks = &i2c_bit_quirk_no_clk_stretch; ret = add_adapter(adap); if (ret < 0) |