linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 2/3] i2c: added I2C_FUNC_NO_CLK_STRETCH to i2c-algo-bit.c
@ 2015-09-16 13:35 Nicola Corna
  2015-09-16 13:35 ` [PATCH v2 3/3] iio: humidity: si7020: added No Hold read mode Nicola Corna
  0 siblings, 1 reply; 4+ messages in thread
From: Nicola Corna @ 2015-09-16 13:35 UTC (permalink / raw)
  To: Wolfram Sang, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald
  Cc: linux-i2c, linux-iio, Nicola Corna

Added I2C_FUNC_NO_CLK_STRETCH to drivers/i2c/algos/i2c-algo-bit.c when
getscl is not available.

Signed-off-by: Nicola Corna <nicola@corna.info>
---
 drivers/i2c/algos/i2c-algo-bit.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index 899bede..82cad0b 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -602,10 +602,13 @@ bailout:
 
 static u32 bit_func(struct i2c_adapter *adap)
 {
+	struct i2c_algo_bit_data *bit_adap = adap->algo_data;
+
 	return I2C_FUNC_I2C | I2C_FUNC_NOSTART | I2C_FUNC_SMBUS_EMUL |
 	       I2C_FUNC_SMBUS_READ_BLOCK_DATA |
 	       I2C_FUNC_SMBUS_BLOCK_PROC_CALL |
-	       I2C_FUNC_10BIT_ADDR | I2C_FUNC_PROTOCOL_MANGLING;
+	       I2C_FUNC_10BIT_ADDR | I2C_FUNC_PROTOCOL_MANGLING |
+	       (bit_adap->getscl ? 0 : I2C_FUNC_NO_CLK_STRETCH);
 }
 
 
-- 
2.5.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-15 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16 13:35 [RESEND PATCH 2/3] i2c: added I2C_FUNC_NO_CLK_STRETCH to i2c-algo-bit.c Nicola Corna
2015-09-16 13:35 ` [PATCH v2 3/3] iio: humidity: si7020: added No Hold read mode Nicola Corna
2015-09-20 10:40   ` Jonathan Cameron
2015-10-15 14:40   ` Nicola Corna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).