From patchwork Thu Jun 14 01:27:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 10463173 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 64FBD600D0 for ; Thu, 14 Jun 2018 01:27:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5693228C6C for ; Thu, 14 Jun 2018 01:27:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4957628C70; Thu, 14 Jun 2018 01:27:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3D7928C6C for ; Thu, 14 Jun 2018 01:27:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935733AbeFNB1l (ORCPT ); Wed, 13 Jun 2018 21:27:41 -0400 Received: from sauhun.de ([88.99.104.3]:48106 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935532AbeFNB1k (ORCPT ); Wed, 13 Jun 2018 21:27:40 -0400 Received: from localhost (softbank126012118084.bbtec.net [126.12.118.84]) by pokefinder.org (Postfix) with ESMTPSA id A1DBD54006A; Thu, 14 Jun 2018 03:27:37 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org, cerg2010cerg2010@mail.ru Cc: linux-renesas-soc@vger.kernel.org, drivers_video-dri@kernel-bugs.osdl.org, Wolfram Sang Subject: [RFT 1/2] i2c: algos: bit: apply generic delays on initial STOP Date: Thu, 14 Jun 2018 10:27:13 +0900 Message-Id: <20180614012714.5937-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180614012714.5937-1-wsa+renesas@sang-engineering.com> References: <20180614012714.5937-1-wsa+renesas@sang-engineering.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When using the generic functions for setting SCL/SDA high, we make sure necessary delays are met. Signed-off-by: Wolfram Sang --- drivers/i2c/algos/i2c-algo-bit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)