From patchwork Fri Jul 13 21:09:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 943823 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="E/PhizbG"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41S56j6vFqz9s2g for ; Sat, 14 Jul 2018 07:10:05 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731871AbeGMV0Y (ORCPT ); Fri, 13 Jul 2018 17:26:24 -0400 Received: from www.zeus03.de ([194.117.254.33]:48508 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731964AbeGMV0H (ORCPT ); Fri, 13 Jul 2018 17:26:07 -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=b6oGDBIBfv/l0HoECb650AG0im9yfc37flMn/wBVbNQ=; b=E/PhizbGDs2C nmJzLFHh6i3bLfBfp4JV+QsTa6UaIHznQLrQvmWj44hCkyZUwmb77InHDZtpaCNo iML/mnWzEYUU7jqN0MaqZ0GJ3Oo/K/n2Vc+riztk5EFYHWOS6eu3IfMmpWxUr56o /LYuBPNL3wxXVZhKsMVFGZDAhlugiP0= Received: (qmail 3547 invoked from network); 13 Jul 2018 23:09:45 +0200 Received: by mail.zeus03.de with ESMTPSA (ECDHE-RSA-AES256-GCM-SHA384 encrypted, authenticated); 13 Jul 2018 23:09:45 +0200 X-UD-Smtp-Session: l3s3148p1@C90y5udwfuUgAwDPW8bBAAId4P/+oMhl From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel@pengutronix.de, Wolfram Sang , linux-kernel@vger.kernel.org Subject: [PATCH/RFT 5/6] i2c: imx: set SDA as output for recovery Date: Fri, 13 Jul 2018 23:09:17 +0200 Message-Id: <20180713210920.3648-6-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-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 3e23ee26c55c..a3881e270106 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1009,7 +1009,7 @@ static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx, PINCTRL_STATE_DEFAULT); i2c_imx->pinctrl_pins_gpio = pinctrl_lookup_state(i2c_imx->pinctrl, "gpio"); - 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); rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_OUT_HIGH_OPEN_DRAIN); if (PTR_ERR(rinfo->sda_gpiod) == -EPROBE_DEFER ||