From patchwork Tue May 24 12:41:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 68497 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp607497qge; Tue, 24 May 2016 05:41:18 -0700 (PDT) X-Received: by 10.98.48.71 with SMTP id w68mr6501341pfw.18.1464093678005; Tue, 24 May 2016 05:41:18 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 143si40028043pfy.175.2016.05.24.05.41.17; Tue, 24 May 2016 05:41:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752730AbcEXMlQ (ORCPT + 4 others); Tue, 24 May 2016 08:41:16 -0400 Received: from mail-lf0-f43.google.com ([209.85.215.43]:36038 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752299AbcEXMlQ (ORCPT ); Tue, 24 May 2016 08:41:16 -0400 Received: by mail-lf0-f43.google.com with SMTP id e130so5677572lfe.3 for ; Tue, 24 May 2016 05:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=4jid2pTnKTFJrjiZw6YrxCQW6VH6ccOeU+bxU96iNw0=; b=BpeWMQmSnZqMkuHckhwJbrGxzyCLYMe/G+O8iyLVpwVf7wGnr6HQdu4CNx1nW5OH+u B0Hjv8lDVe5KU+R/2GdnPizWGTmxkdELyleUQAicNX3ST74PMt45KLu+qveJT2zBUKkn Hn8XtqZYtuDRqjATA7ZlZys2nD2MVAIKM312c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4jid2pTnKTFJrjiZw6YrxCQW6VH6ccOeU+bxU96iNw0=; b=WJz7VpJpd0kPjTdMnpvShukF5veWPtncQz5vHi4n7Jzcd3a8XdTK7TYHIxtINCk+Gg rOnYtif77k7Nb3av9SiTd5N7R+kSx3Iaj6Pw4NWzbphYyBYxdPDEWidmFdnynKPc+fCD Ek9lu1+TxMg0jMyfzoXliVwMOn0m3y2wfo1BIi9i0OJ3Z5xw7KcYazsgjPj12+mx9lZo HSQSTRCpMlqEnnzXUAWFGiUU4oWBCMu/M5t2FF2XmtVaXYN/rtcHEXHkPT0ftvdSEfjd 3B/v9fQYxkpBFq+MuQtG6ZqhGIaSQkpaUN929ZRvLlAkQdDe6f64FaikTLbhrbmgk2Cb H63g== X-Gm-Message-State: ALyK8tLUNaY/Sz3VSvp/41asMJpx4msEjuG6A9TZS5BZKBRqOXaU2cQqEGsNyVB/Ad7wI0zz X-Received: by 10.25.213.200 with SMTP id m191mr107974lfg.232.1464093674370; Tue, 24 May 2016 05:41:14 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id uh4sm485880lbb.46.2016.05.24.05.41.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 May 2016 05:41:13 -0700 (PDT) From: Linus Walleij To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linux-gpio@vger.kernel.org, Linus Walleij Subject: [PATCH] pinctrl: nomadik: fix inversion of gpio direction Date: Tue, 24 May 2016 14:41:10 +0200 Message-Id: <1464093670-29370-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.11 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The input/output directions were inversed on the GPIO direction read function. Loose a ! and it is correct. Signed-off-by: Linus Walleij --- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.4.11 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index ccbfc325c778..38faceff2f08 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c @@ -854,7 +854,7 @@ static int nmk_gpio_get_dir(struct gpio_chip *chip, unsigned offset) clk_enable(nmk_chip->clk); - dir = !!(readl(nmk_chip->addr + NMK_GPIO_DIR) & BIT(offset)); + dir = !(readl(nmk_chip->addr + NMK_GPIO_DIR) & BIT(offset)); clk_disable(nmk_chip->clk);