Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2118522imm; Mon, 16 Jul 2018 02:30:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc5IsSYJUB+9fXk1+tJsOZLfj2uWSmqUXUsfSPyEPaX5wFQmmDwAKqfKCvBz5A9Cogjhrjv X-Received: by 2002:a65:4783:: with SMTP id e3-v6mr14927724pgs.235.1531733447440; Mon, 16 Jul 2018 02:30:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531733447; cv=none; d=google.com; s=arc-20160816; b=qy0fJrsE/G8HEh+KByuQkj1IGbPc6AQep+6YRQTrtztOrPzNZdHlYtwXJSkTt+YCbJ 0TdGVkMBNu/YXOswdaXzecgluIaQ3Hs8APihJSdSECwGRWISz+j4CldwVVwtimYvH8y/ h3FxNRHCurKhCpc0Rdtj9kXGk/BSYcqWPHoi2xCewkhVst0lbZaSPZzazYnGj8huLti/ NiCi/fzt9vQmrL18SDvDwfZIEeYLvG3iHzyLDkHeJ3bnm9d/wy5bwgTKzePyVv43oWSD BzOamyDVsRSOZiINfjK3VCEEwNzLUUMy8IYbfNwxuI0eTvutqbPjVHVMuPOt7nw+lPQq kldg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=dFljKCa7Yi6TufXVKfP+wZra5lNPHm/87cPR2Oc3sZs=; b=UscXvrMtc5KP2QGVlF9PFI/sS97oXVdW2F3wvRqUxdUZBP7ky0wqD4L8bIiOqysC/D 6RUbSvTL+8ufEoNTdI70F4EKR//qGpRM+57lbcFqnU5U5nV8lvNKx6SQ27Hzmisv9Cyf OujmgTvsdKHjjyqj9UwYwY0zjiGLXuhum52uWgy9/DF+286BEm76Ferlg7FCG1v2iu1Y 034evcJ5/0Jd7/2lTusqIZs8UC93soBCMweYfXno23tRb8HGSuDbuQb35+f1qjlRAr75 Pva0immy59tMUbrIOQRmJIdEeaxxFmowZlQkMFP8o/BkAN3o/CmmyEKJB0Zig70ItyAJ OP3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O0wHEERE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s184-v6si28278417pgb.123.2018.07.16.02.30.32; Mon, 16 Jul 2018 02:30:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O0wHEERE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730027AbeGPJ4B (ORCPT + 99 others); Mon, 16 Jul 2018 05:56:01 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:36370 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728025AbeGPJ4B (ORCPT ); Mon, 16 Jul 2018 05:56:01 -0400 Received: by mail-oi0-f67.google.com with SMTP id r16-v6so73523864oie.3; Mon, 16 Jul 2018 02:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dFljKCa7Yi6TufXVKfP+wZra5lNPHm/87cPR2Oc3sZs=; b=O0wHEEREX4ITP7kE/g15CQjd1eylwPXxMP1ZnBqLwQo4PZDf+V5eZcX/ozs8htcBSF 5QW63DukS9CUd0mqeS5vddZEKvo5AOG1jIfD/Y6ngHTvj2yK7IQFOFXIetBQCdaDls9I t7Vz7sc40S8yHkbTgnKS7r2/mwGaGwLIYEl34znLjqMLo2N1d/z+XTMNByUATcGpNHfv W1wTxbRIA6fQ62v3x/rRLih7nb3+ytpc2j4ow1nJImynqUN9Hen+PQzGqofoeYNAu0Pv FEDTagKGYjybOfesk4oR/izKbp9zBNYQwCWl47qNNGCmPBAypGqEp8+oPSedKnZIuqBY D7Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dFljKCa7Yi6TufXVKfP+wZra5lNPHm/87cPR2Oc3sZs=; b=YOGuIFASjD45o9bc07XQAT+t6wWLUyr7BS6J1R2sRTu9Zjb46HS44mULSMkanLCc2h 7ombgv9ZGOCkE64lA8EdcbFNxqAhpV+GR6D9/7IstqTzulR5dI66+f9r1nNASEF6aaRl h0Ah5L+3TdZdNY/jyyVJJ/GP/+T0X5vH6FPAyw6MCSyhHn2FZlg4/BEiTQ5LUFvlQEpS mjRV5hMt6496EDOTet5BYG4Dg9GtVj4dDG4QnN8Qf4oMSsOCnhTDSrsJJuTteBY7pCgr AywAfQkO521+293FYDTMMC7AGaD6HONvn+fmoJ8xsu49xFsinACwAMXA2mk6oC/XTU9T PLTQ== X-Gm-Message-State: AOUpUlE6MbtWNN98dnw7aTkAY0CVDkHPUVrTKOlvDIwSFDOz2d25wz5y 0nVdKAtAbIoA/15pbK16vx1qWwJBDFwnpuC9Z2Og X-Received: by 2002:aca:d9c5:: with SMTP id q188-v6mr16029478oig.239.1531733369941; Mon, 16 Jul 2018 02:29:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:761e:0:0:0:0:0 with HTTP; Mon, 16 Jul 2018 02:29:29 -0700 (PDT) In-Reply-To: <20180713210920.3648-7-wsa+renesas@sang-engineering.com> References: <20180713210920.3648-1-wsa+renesas@sang-engineering.com> <20180713210920.3648-7-wsa+renesas@sang-engineering.com> From: Ulrich Hecht Date: Mon, 16 Jul 2018 11:29:29 +0200 Message-ID: Subject: Re: [PATCH/RFT 6/6] i2c: recovery: remove bogus check if SDA GPIO is set to output To: Wolfram Sang Cc: Linux I2C , Linux-Renesas , kernel@pengutronix.de, Wolfram Sang , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 13, 2018 at 11:09 PM, Wolfram Sang wrote: > This check did not work as intended. I2C is open drain, so this function > will likely always have presented the GPIO as input because > gpiod_get_direction doesn't know about open drain states. Remove this > check for now. We can add it again once we know how to get more precise > information about the GPIO. > > Signed-off-by: Wolfram Sang > --- > drivers/i2c/i2c-core-base.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c > index 301285c54603..7c5f012f561c 100644 > --- a/drivers/i2c/i2c-core-base.c > +++ b/drivers/i2c/i2c-core-base.c > @@ -261,9 +261,7 @@ static void i2c_init_recovery(struct i2c_adapter *adap) > bri->set_scl = set_scl_gpio_value; > if (bri->sda_gpiod) { > bri->get_sda = get_sda_gpio_value; > - /* FIXME: add proper flag instead of '0' once available */ > - if (gpiod_get_direction(bri->sda_gpiod) == 0) > - bri->set_sda = set_sda_gpio_value; > + bri->set_sda = set_sda_gpio_value; > } > return; > } > -- > 2.11.0 > Reviewed-by: Ulrich Hecht CU Uli