From patchwork Tue Aug 20 13:59:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 171805 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp4459052ily; Tue, 20 Aug 2019 07:00:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxp1JTOGbk3D8sFWrE6l+O4qd9/5WBicZVdfJqezaYsfXGbNoJ2mLktfHgIcpz+d+Ut9YGA X-Received: by 2002:a62:d0:: with SMTP id 199mr30023529pfa.157.1566309603100; Tue, 20 Aug 2019 07:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566309603; cv=none; d=google.com; s=arc-20160816; b=NV4kv2AgrwFD+4QRuRjglUDGZ/qFiWCEW/y7fMMJAosylKO99kZyFzV6MJ6/yHE6wO XvTCuPy8l7s185TWP9edqWMCqcfTxnH1R2vnnAHSxJfJf6ibnhwv2hByF3TkA4ZFNKpd f+Kl47hTgHuyMSlYb0p/yDeypNnsnO8gFrOM4X24jUWJqUaZYJpifXVkHpJoRbv1ysws YtqmDIUQo2xTDpQN1LWvP3LyC2J89ffhSyfj8TBMUdrVzx7LoYyHs5eYaRymZK1dzeRZ hNq1CethffjyJpgNivDDhvJGZgnXHeGbVVq+b7smUYjbjfShSMbrGz/Yl0qX6C9d3w5H Dv+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2SPeETwTtdte0J8tWKb47NzI2JHXSv9wBHtQSqBHm7M=; b=aYYQZCvfR3wpuIRtXs/JOeky6AeDopMWWGK+srz1s/c0QvtjuntrOKKqjUEZlVYI1q QSTptBFhR6P8dCsUaiHmOXRXeXP/woByq73Y0oMsEeyiqRlJyCer6vxQV5y1bi0/mZZz 4AooxqJsUCYG0y1JarJG7F+wRAi/f4RxSrbx0E9qX6vT58jseWJqWirnV4hCWzK9VL9A K04WYmXIBDla7Bt/+Lk5qXrxtsQJMn2LxakpGzBGVx6JrCkz6dGQXukLfqX6lUet1JI6 W1v2TqUh5sktE13zyYzF1G2UqKpCwNZsx5NVNm0y+LzDeNeamUkoKAhwjh1iHI34X3Ir k5gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c6P+TTSk; 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=pass (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 v63si11952345pgd.111.2019.08.20.07.00.02; Tue, 20 Aug 2019 07:00:03 -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=pass header.i=@linaro.org header.s=google header.b=c6P+TTSk; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729992AbfHTOAC (ORCPT + 5 others); Tue, 20 Aug 2019 10:00:02 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:39666 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730115AbfHTOAC (ORCPT ); Tue, 20 Aug 2019 10:00:02 -0400 Received: by mail-lj1-f195.google.com with SMTP id x4so5232902ljj.6 for ; Tue, 20 Aug 2019 07:00:01 -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:mime-version :content-transfer-encoding; bh=2SPeETwTtdte0J8tWKb47NzI2JHXSv9wBHtQSqBHm7M=; b=c6P+TTSkcMPtHRWACPSXXJ4M4uXHOzHo5JJxbtGOYSHYtMkGdcq+pDNhUgX3pqNhdI +MSxeQvBtmeKy7pCOoiRMxO+5t31JPY2bjUxYmvKfbSUz7F3bLnoFlCcFLzwV+idQuU/ itnFD/wcavbaGBYOQe6nU3E7086BZIOBj+PHg0G9XlCKYj57yRb5KC0/aqW3bg+OfxVB EAuhyVCQVuvF1mITX2BR83AjszjFw/NzjwZI97yBrMshRRHxuf1SaICUgzXr4yUOPjga /RgDuiaBofj+CFlvy/1S5whfpVKW8nqr0j0Tu+TPsPGGei50qNot06/R3R5bi62nORkq p/tQ== 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:mime-version :content-transfer-encoding; bh=2SPeETwTtdte0J8tWKb47NzI2JHXSv9wBHtQSqBHm7M=; b=n60AWPnbYNqTZW2RvakzMxTRph5Y9W9O644yc83rfAHUHGjLSDfnLSrGxaj08fLVku k8yEQHJEOhEa0/wm4KJrj923cRHp+NAVUpCtP4c5bn1fcgzj6AtdSdBkW8ZkVqM7sow0 PlA/jO7ZRRaNKBeJTtmNkzTY0Rm3Uis2OiUeuUJQW/T1bMw1U5EXl8l4LnBLWWEy7iBP GuCdXf13ruiOQvZ/Z8TiwL65JAAjQFi44eMvJ6X9KFqQ3etxcfxFwBtflJNsJif8lgGk rXT96uCFvHbMTUCG6sDrj27eMuWZ+gywketemiNsohROWs0qt9gbMPNWZ+/7JZcNCQP1 IyJQ== X-Gm-Message-State: APjAAAU+dBX4El7rtmQaJaYoZErjhCsXpRIHXBu2N4vYj/mQs5mnov5h sUGjQzOwlYsrT1q64FqfwVPkNCLUzI4= X-Received: by 2002:a05:651c:1a7:: with SMTP id c7mr15607039ljn.89.1566309600093; Tue, 20 Aug 2019 07:00:00 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id w6sm2871543lff.80.2019.08.20.06.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 06:59:58 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , Chris Brandt , Geert Uytterhoeven Subject: [PATCH 1/2 v3] pinctrl: rza2: Drop driver use of consumer flags Date: Tue, 20 Aug 2019 15:59:54 +0200 Message-Id: <20190820135955.14391-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org These flags are for consumers of GPIO lines, not for drivers. Cc: Chris Brandt Cc: Geert Uytterhoeven Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - New patch for just this. --- drivers/pinctrl/pinctrl-rza2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.21.0 Reviewed-by: Geert Uytterhoeven diff --git a/drivers/pinctrl/pinctrl-rza2.c b/drivers/pinctrl/pinctrl-rza2.c index 5b951c7422cc..b0806667e94c 100644 --- a/drivers/pinctrl/pinctrl-rza2.c +++ b/drivers/pinctrl/pinctrl-rza2.c @@ -115,7 +115,7 @@ static void rza2_pin_to_gpio(void __iomem *pfc_base, unsigned int offset, mask16 = RZA2_PDR_MASK << (pin * 2); reg16 &= ~mask16; - if (dir == GPIOF_DIR_IN) + if (dir) reg16 |= RZA2_PDR_INPUT << (pin * 2); /* pin as input */ else reg16 |= RZA2_PDR_OUTPUT << (pin * 2); /* pin as output */ @@ -134,18 +134,18 @@ static int rza2_chip_get_direction(struct gpio_chip *chip, unsigned int offset) reg16 = (reg16 >> (pin * 2)) & RZA2_PDR_MASK; if (reg16 == RZA2_PDR_OUTPUT) - return GPIOF_DIR_OUT; + return 0; if (reg16 == RZA2_PDR_INPUT) - return GPIOF_DIR_IN; + return 1; /* * This GPIO controller has a default Hi-Z state that is not input or * output, so force the pin to input now. */ - rza2_pin_to_gpio(priv->base, offset, GPIOF_DIR_IN); + rza2_pin_to_gpio(priv->base, offset, 1); - return GPIOF_DIR_IN; + return 1; } static int rza2_chip_direction_input(struct gpio_chip *chip, @@ -153,7 +153,7 @@ static int rza2_chip_direction_input(struct gpio_chip *chip, { struct rza2_pinctrl_priv *priv = gpiochip_get_data(chip); - rza2_pin_to_gpio(priv->base, offset, GPIOF_DIR_IN); + rza2_pin_to_gpio(priv->base, offset, 1); return 0; } @@ -191,7 +191,7 @@ static int rza2_chip_direction_output(struct gpio_chip *chip, struct rza2_pinctrl_priv *priv = gpiochip_get_data(chip); rza2_chip_set(chip, offset, val); - rza2_pin_to_gpio(priv->base, offset, GPIOF_DIR_OUT); + rza2_pin_to_gpio(priv->base, offset, 0); return 0; } From patchwork Tue Aug 20 13:59:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 171806 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp4459135ily; Tue, 20 Aug 2019 07:00:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMMIuA33ylBZbySHsENTJHIgd8nuQ/7/WNndT41uUo/bqZLHFyNfh4NE7//oGiIoq5BNk0 X-Received: by 2002:aa7:915a:: with SMTP id 26mr30139298pfi.247.1566309606508; Tue, 20 Aug 2019 07:00:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566309606; cv=none; d=google.com; s=arc-20160816; b=REwazNg6AQncNpOT6Nt/tM17z2cfFBPFsvbTtpE1svFs6S/MvORb6vFH4ngsZ+iGAY J35fCSd5YiNukcd7BSK/rSrUOaJItorfOCjdThkQmpnUSI1EZTqKdfoPPeqgPqZSmWu+ 9h2z/0NnXavYi79jiZve0NTvWjstGEI+5eWlETTiDt72OrpWziqr6ujSIGYb2kx68DXI JYiGTIX76uT4Wr+Z1SMNfoOG60Ke6GqgDh+c6Q53hIyPnom5VghgW5/uusnBLH5F0SWE tGIf9X5Ipvta5yfQJ1E11f0RNV5J5T81B7U45+UK9mYUR2xX5tAOF08krfnSo4HG0wqK 1lEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fdjrR163OvNQOzxW/RsIvv+HcRRibCJSVQsaILHRThk=; b=hYzJFNiWX296fJ14Aj75M44BObemM6a75xjp0dEW0f0UaioRskyLcgZo8pKY2WU6iF V+8liNnzwkXwRqhVezNWihBsLxudB60BCCMFA2fQln3yeVj/OSJ8cOdGYAEzhT9qfls6 SLKzvuRU7/bkzLYDxSk8roBmylM94Lh4inpcAvIaw2KP8ccDIQeZJGAyBqCujFmZJYPl GajJ2G4eEa2q5vB0rULPNn9N4/QX8A9kqdUi/Lvi23TdlRs5AinFqa71XnyXZ6pXdTHD iPB4KPxl0fIYm2yzi92QtJIny2F1KQmqDR86mHWyk3UDI/jGE36PGsQoFSHzlAvfmeln Vznw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wHouE7eP; 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=pass (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 a13si11889524pgt.217.2019.08.20.07.00.06; Tue, 20 Aug 2019 07:00:06 -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=pass header.i=@linaro.org header.s=google header.b=wHouE7eP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729965AbfHTOAF (ORCPT + 5 others); Tue, 20 Aug 2019 10:00:05 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42358 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730115AbfHTOAF (ORCPT ); Tue, 20 Aug 2019 10:00:05 -0400 Received: by mail-lj1-f193.google.com with SMTP id l14so5217571ljj.9 for ; Tue, 20 Aug 2019 07:00:03 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=fdjrR163OvNQOzxW/RsIvv+HcRRibCJSVQsaILHRThk=; b=wHouE7ePHN8eNwsYy28BvJsYnIes3rPayPyN193n0neli/u9XOvq4HENFHhn5aRo7X oW+kMVxRNbXWC+apGuEFv/lxjJbVZtO1ZxR0UYu38x4NSZeD3qTM1jwggYcpWEx99CM1 TVXzX3+rBreXuL4+oYDHs8GC2d3C1Bd54CweY8OfZSCPoGKWAstdwaKo4gs9sJLju161 LJ61ETGhP5NpWm43vDIUxUzfVhqOPGNaD1zH4i2gZri+ONvHAW0wexokXlv93Os4hk6A N6NiZpq1qudPE+9egU2awXsbGTeQJpORpxRhCF9igAmheqq/VMsQd4izWsuti/FyylLM nj6w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=fdjrR163OvNQOzxW/RsIvv+HcRRibCJSVQsaILHRThk=; b=eg+nYR7G1XFvJUu9Glqn6PXNJp3RN7Kw9hXUTor9pAJnUcjXiX0Zer7KqzZC6J9NWp wltogjXlBSKpzfE6Uup3hZ6Vb+frVa+vo6Jzh/Sy5ZkP3n1sxR5DsVKDwY1UgT05z2PW /fm8AdKx4tGj52wHqCSiEKi2cs0JgygHQPAMH894p8AUXP+MzWlQOQiEKzBebhUSZMql 9Mqr2RHPLXlAv8xKQgN3sPlh2f2p5ihi7Hep5Ok4/ER81NcGG6k1KzeTe+bFC5MlRA9q VwSG9SzBVeIFCy495w7Z6nPSpQpxbnp55kpKdfsYdZfN5mb3nT2TUfOZeL5n5GTOyE/l /pKg== X-Gm-Message-State: APjAAAWtwqTADc6bXtkoDUykEDJEdWk+LUWivwd6He/vTJD3nv6GXgJ0 a5SauT8htNW1FKm34791zJaIaulpDac= X-Received: by 2002:a2e:9582:: with SMTP id w2mr15043166ljh.194.1566309602528; Tue, 20 Aug 2019 07:00:02 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id w6sm2871543lff.80.2019.08.20.07.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 07:00:01 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , Chris Brandt , Geert Uytterhoeven Subject: [PATCH 2/2 v3] pinctrl: rza2: Include the appropriate headers Date: Tue, 20 Aug 2019 15:59:55 +0200 Message-Id: <20190820135955.14391-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190820135955.14391-1-linus.walleij@linaro.org> References: <20190820135955.14391-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This driver is implementing a GPIO driver so include and not the legacy API . When testing it turns out it also relies on implicit inclusion of (readw etc) so make sure to include that as well. Cc: Chris Brandt Cc: Geert Uytterhoeven Signed-off-by: Linus Walleij --- ChangeLov v2->v3: - Fix one more instance. - Test compile properly. ChangeLog v1->v2: - Remove the use of GPIOF_* consumer flags in the driver. --- drivers/pinctrl/pinctrl-rza2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.21.0 Reviewed-by: Geert Uytterhoeven diff --git a/drivers/pinctrl/pinctrl-rza2.c b/drivers/pinctrl/pinctrl-rza2.c index b0806667e94c..3be1d833bf25 100644 --- a/drivers/pinctrl/pinctrl-rza2.c +++ b/drivers/pinctrl/pinctrl-rza2.c @@ -11,7 +11,8 @@ */ #include -#include +#include +#include #include #include #include