From patchwork Mon Aug 6 23:04:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 143547 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3812781ljj; Mon, 6 Aug 2018 16:04:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdSdwr1amJ75OIaMOMDf9Emc1dCzW9YFQHF6GUCy4nQThK1B+icPPDOeKmMhZGNMsdEeUW3 X-Received: by 2002:a63:d80f:: with SMTP id b15-v6mr16450006pgh.347.1533596696899; Mon, 06 Aug 2018 16:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533596696; cv=none; d=google.com; s=arc-20160816; b=Pd7HW+HtoxZJWfL5alADLzCXuytPpZlIjIDy1yzWQqxXJ/aCQr1L8yxWANQlVeyHpm SEVjJ7Z8/eUdURQqWRXbIzzWn/K1S2XvTWObH+rS96/35hu28gTnZt4xp2gkmWxybjcO AojhpHVKtvfYatOjVDpWhD+VN/d8BhqQEu51ZUfAzfVkWnP4NUuoZCYnxKRNdjkMVdSQ Ya3IgZR7JwvsY/6OoxOpE8ouvJEdUNj+KQjlGZpunUkJOmKZ9sffLU7Al/xTSi/Zt68N J94zFLezkX7h20mAQke75efUbyATvi8F41zO9IkGlNhdfuNs6n8Lhm2QctKdPGU0PD0z jhzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=A3MQhJRvV5EuU2eqefrfl/Hr5sRB/wibgJ64pcT04ZQ=; b=YSCX4n7z925NudyHEcM9w+TarZPjS4suRNv+kjJ8u9s9q6IcvBo62XH0/oDJ7ZNhsz qYzfb0YbDZcuvbEkU5VqS+UdPyMnqz7pZZQMyl3LypMCc+qd5UZezHnvPx3iD9Tr6tG2 1fUoiO7LruG43nJjVbUpuENvfnliw2bXAaMchA+hHsddUs2TQXskj7FWi9TddlDArpZj UqpkEsB87rQU5ohMUAIIVwB+fVRdeOhqwoc4kzjLZUr4b/8/MZtMA/NTVW1s2XiLr0gi 2LifUctyP+hj+b2HICj7JRdb90/S5u+ysdshJQckbSStKW+6B4LAM1SNnSn6shc1iQy6 Qcrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EF1q7QKi; 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 sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f15-v6si10833783pli.194.2018.08.06.16.04.53; Mon, 06 Aug 2018 16:04:56 -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 header.s=google header.b=EF1q7QKi; 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 sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730869AbeHGBQL (ORCPT + 5 others); Mon, 6 Aug 2018 21:16:11 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34858 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729976AbeHGBQL (ORCPT ); Mon, 6 Aug 2018 21:16:11 -0400 Received: by mail-wr1-f65.google.com with SMTP id g1-v6so10394739wru.2 for ; Mon, 06 Aug 2018 16:04:51 -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=Ik6bQmN1sR8RkQIHOWh88qQlaJTIsBAIkJ/CxoRgi8c=; b=EF1q7QKiKD7po9kOBfAYvNSFxvUxtUJrZItbb3pnf1QI7oc/+iYDByUXd6+NdcMBtu S0K+KUZ7vV/x0VXAubvr8OOH7i8iNRd4C1woIiyFd/wvam3AeBFTE0u2w+k4cLgjmA40 OtL6bOuiVJvf/+NUh8UAHiHzhXKBuJ/sydRvI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ik6bQmN1sR8RkQIHOWh88qQlaJTIsBAIkJ/CxoRgi8c=; b=BAP7DvjgQEnd15EiVa4w0LQThrH3BoGiYuc5YPW4FIPVi8Bb4voKyG8vQoAUvQ7YzY THXWgf+DrklBxsfZ+DM3DGR/BOExTXWvNKiFVJc9vURzZPUIITeQtbmVC1lfEqOPhla6 nPv1cF5UCho+mHKOMggzBtSWeQ40GXZ/33C7zig4SQfHe4TUbPjQ9y8yfd+iy6yQ1dom zA36A3P2UrJQQFeg/fJkIHEQ42ISSAsCdPsjvLt/qNCNHtrU/kOQ0y4jZF/IKRd0KXdS JluYBXTAw1isTmwFzQ/j9OuqgubQR17LJOshbBNMzSHBevmHskQRCliTLga56s/WS5rd WC+A== X-Gm-Message-State: AOUpUlHFd1u4j0y9sYLrgOtq5Thm06yiUroenKGmXpaOuaEAgk6aObGn OP+KFP+FGrIjuDzZvjORbIVUQbQhvzc= X-Received: by 2002:adf:8877:: with SMTP id e52-v6mr11604576wre.30.1533596690851; Mon, 06 Aug 2018 16:04:50 -0700 (PDT) Received: from localhost.localdomain (catv-89-135-96-219.catv.broadband.hu. [89.135.96.219]) by smtp.gmail.com with ESMTPSA id b6-v6sm22212405wru.66.2018.08.06.16.04.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Aug 2018 16:04:49 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Stefan Agner , Dmitry Osipenko , Thierry Reding Subject: [PATCH v2] gpio: tegra: Include the right header Date: Tue, 7 Aug 2018 01:04:39 +0200 Message-Id: <20180806230439.32748-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver so include only . Drop the use of GPIOF_* flags: these are for consumers, not drivers. Just return 0/1. Cc: Stefan Agner Cc: Dmitry Osipenko Cc: Thierry Reding Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Also get rid of GPIOF_* usage --- drivers/gpio/gpio-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.0 -- 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 Reviewed-by: Dmitry Osipenko diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 2d940785bad0..8e5f3150c6af 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -207,7 +207,7 @@ static int tegra_gpio_get_direction(struct gpio_chip *chip, oe = tegra_gpio_readl(tgi, GPIO_OE(tgi, offset)); - return (oe & pin_mask) ? GPIOF_DIR_OUT : GPIOF_DIR_IN; + return !(oe & pin_mask); } static int tegra_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,