From patchwork Fri Jul 13 21:09:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 10524183 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 DC7D5602B3 for ; Fri, 13 Jul 2018 21:10:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD90029E13 for ; Fri, 13 Jul 2018 21:10:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1B3629E20; Fri, 13 Jul 2018 21:10:10 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable 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 6AA0029E13 for ; Fri, 13 Jul 2018 21:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731898AbeGMV03 (ORCPT ); Fri, 13 Jul 2018 17:26:29 -0400 Received: from www.zeus03.de ([194.117.254.33]:48482 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731962AbeGMV0G (ORCPT ); Fri, 13 Jul 2018 17:26:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references; s=k1; bh=TyDHIV3F6W2grOqvBRQ47E4KYK9To9LnJv0HUB34Sbw=; b=OzaSE55Lv2UY eV1dDaD26J9BMTZsYt+zwqBBWchf42c6HEpKB/gbDrhM5XEhtczYcRkZbsEmx0bt IvBbh6yZnvYQ/pOee7Gxi83VelBM5Efq5seBlZToCNj3LFm2BcXa15v7T6QUkECW GYCCeqOQojWRIUAVBYuZ6WMPd+O2XIs= Received: (qmail 3509 invoked from network); 13 Jul 2018 23:09:44 +0200 Received: by mail.zeus03.de with ESMTPSA (ECDHE-RSA-AES256-GCM-SHA384 encrypted, authenticated); 13 Jul 2018 23:09:44 +0200 X-UD-Smtp-Session: l3s3148p1@Otoo5udwfOUgAwDPW8bBAAId4P/+oMhl From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel@pengutronix.de, Wolfram Sang , Sekhar Nori , Kevin Hilman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH/RFT 4/6] i2c: davinci: set SDA as output for recovery Date: Fri, 13 Jul 2018 23:09:16 +0200 Message-Id: <20180713210920.3648-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180713210920.3648-1-wsa+renesas@sang-engineering.com> References: <20180713210920.3648-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 This allows for sending STOP when generating pulses which is much more robust because it will bring clients into a default state. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-davinci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index d945a2654c2f..478acf0870aa 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -874,7 +874,8 @@ static int davinci_i2c_probe(struct platform_device *pdev) r = PTR_ERR(rinfo->scl_gpiod); goto err_unuse_clocks; } - rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_IN); + rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", + GPIOD_OUT_HIGH_OPEN_DRAIN); if (IS_ERR(rinfo->sda_gpiod)) { r = PTR_ERR(rinfo->sda_gpiod); goto err_unuse_clocks;