From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751438AbbIGLHR (ORCPT ); Mon, 7 Sep 2015 07:07:17 -0400 Received: from 7.mo5.mail-out.ovh.net ([178.32.124.100]:43475 "EHLO 7.mo5.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750907AbbIGLHP (ORCPT ); Mon, 7 Sep 2015 07:07:15 -0400 From: Nicola Corna To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nicola Corna Subject: [RESEND PATCH 2/2] i2c: added I2C_FUNC_NO_CLK_STRETCH to i2c-algo-bit.c Date: Mon, 7 Sep 2015 11:48:02 +0200 Message-Id: <1441619282-1931-2-git-send-email-nicola@corna.info> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1441619282-1931-1-git-send-email-nicola@corna.info> References: <1441619282-1931-1-git-send-email-nicola@corna.info> X-Ovh-Tracer-Id: 6764125165720396654 X-Ovh-Remote: 151.55.86.87 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekgedruddtucetufdoteggucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekgedruddtucetufdoteggucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Added I2C_FUNC_NO_CLK_STRETCH to drivers/i2c/algos/i2c-algo-bit.c when getscl is not available. Signed-off-by: Nicola Corna --- 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