From patchwork Tue Sep 26 12:17:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 114253 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3759567qgf; Tue, 26 Sep 2017 05:18:19 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCbqWhjJV1PPASqKjPnZXxp9pymUmwEyKdLMGbHOHCWkJnHhpwumM+WRKqgGSLvJaTKXjgN X-Received: by 10.101.76.141 with SMTP id m13mr11056755pgt.103.1506428299431; Tue, 26 Sep 2017 05:18:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506428299; cv=none; d=google.com; s=arc-20160816; b=sF3iYzd550Vu4Gr9ZgVYnBZbqyr78i/acVlyQPykgMHdyP9hvKywCzRvP7W4nBd6Fp vnwVpAsjMRSigg2pVn4gUQTK9rIqzMWyHvjQnTVVI5jowtJ42W/OYZceMnbD06Mjtp1f /Rxm96YWr6Gmnhyiyol10jwyRmgS+SGxzlaVrH8RIW5Z3J2/tMHo/sryyFlwtmqayy4P 68Rk7DQk9TfEqVaoddV5Hu57PnRKS/K+8O+kKXSuapvkWRzMnffqPT5kIKqmMeuSs2t8 HZwq5qYKUlRqrR2rPscS/bWm5u1Xc5Lod4J6jBA7XvoOngKlEd/oQQLsSDBgkZME2VX7 3rLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Pi3f5Kbu9exO5JncxhR6iE9+1rwQkDR/AYrkt8P6Rqs=; b=U2oPqTY6/4tLjqIKtEg82xrqyzqUZj7+3IZwNF34w7fbdMktUYUS4av5dnnelgvGNA zSmA2GFyNtuJAWiWSrqxBgOYRNTSQIazujKXhAqodoWJPrlKVhf81/Il/Oq5GEVXGK7g Q+f5pMvKL10/cdMJsRYKQhmZ3L+vZeKufUoy8XlcL75p1J4EZjg8pVGt/w9elc8iu15v 1Cbeuhsse5ARi1D0JTmh6/1efymF4Y/93uqhjdnWrYB/Ty3K8owQl/khfl25HVy28pe/ AML9WLiKvjd/1gD5d0aWwWaQRdc6Ungkf1k6zATIVi2KMVSHTJf/cMIgN2IFJyprdUPm NbyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si5652646plp.584.2017.09.26.05.18.19; Tue, 26 Sep 2017 05:18:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968594AbdIZMSR (ORCPT + 6 others); Tue, 26 Sep 2017 08:18:17 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:52130 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965758AbdIZMSQ (ORCPT ); Tue, 26 Sep 2017 08:18:16 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id 50CBB20934; Tue, 26 Sep 2017 14:18:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 8777E2088C; Tue, 26 Sep 2017 14:17:55 +0200 (CEST) From: Quentin Schulz To: linus.walleij@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, lee.jones@linaro.org Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, thomas.petazzoni@free-electrons.com, Quentin Schulz Subject: [PATCH v2 05/10] pinctrl: axp209: add programmable gpio_status_offset Date: Tue, 26 Sep 2017 14:17:15 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org To prepare for patches that will add support for a new PMIC that has a different GPIO input status register, add a gpio_status_offset within axp20x_pctl structure and use it. Signed-off-by: Quentin Schulz --- drivers/pinctrl/pinctrl-axp209.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- git-series 0.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" 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/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 4be1aca..11f871e 100644 --- a/drivers/pinctrl/pinctrl-axp209.c +++ b/drivers/pinctrl/pinctrl-axp209.c @@ -89,6 +89,7 @@ struct axp20x_pctl { unsigned int ngroups; struct axp20x_pinctrl_function *functions; unsigned int nfunctions; + unsigned int gpio_status_offset; }; static const struct axp20x_desc_pin axp209_pins[] = { @@ -127,7 +128,7 @@ static int axp20x_gpio_get(struct gpio_chip *chip, unsigned offset) if (ret) return ret; - return !!(val & BIT(offset + 4)); + return !!(val & BIT(offset + pctl->gpio_status_offset)); } static int axp20x_gpio_get_direction(struct gpio_chip *chip, unsigned offset) @@ -509,6 +510,7 @@ static int axp20x_pctl_probe(struct platform_device *pdev) pctl->regmap = axp20x->regmap; pctl->desc = &axp20x_pinctrl_data; + pctl->gpio_status_offset = 4; pctl->dev = &pdev->dev; platform_set_drvdata(pdev, pctl); From patchwork Tue Sep 26 12:17:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 114254 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3759575qgf; Tue, 26 Sep 2017 05:18:20 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCx5LBWkNY8MCgdEbnWoAqoB7J1OeWQpK73peWhivKdWVicQMf9SdBf7XtFDGX1LIE10t3O X-Received: by 10.98.152.209 with SMTP id d78mr10619515pfk.58.1506428300357; Tue, 26 Sep 2017 05:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506428300; cv=none; d=google.com; s=arc-20160816; b=xwnK2A9l0kDA9pG1ITZGruT+zCOSs68OoYMuQcwsDmWVPVJUbtWtRjozFWO4A5Ax/F aAUjLZ+EZySTQUmVlJFiLnIeyrjsqTqghU6xPP0fLSDzhn5+T9iRv5SXwzJv3kSVPrxi 2jLCHvl7dFthypUX+3tQ67rVPI18P4dSsxORs9WNGKnc7WsQWhXEEcUVSRHSMEZ3dTqZ p9tDyn9YcSLqctMWnq1junFME5UuRW+nJeQoj9sJQ7D0Jsa9HYpH9Lu7vDHswS737TZJ +HGqf01XtPyAVZKt9Djfiv7PFrMo/lXwRGnsqDJGHpcvil25Ea0VTZmVusHjpgr1ttLV 5dXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=H0UxvlKcnCNbsO+yG4xl6OrswIg75m8qnfDxJ6qP3eI=; b=e9ohvIlcdeCmcIMatVo30Nv8IE47qhNHzOtm7cnD3hO3+gPlGCHvCtz4Gw0SosibLB vezgkF7I1FzdEzzDdRsgSRg3b3f+naN7PG97wWA/NXz3q3ZXy2vJzL56pYfBX/+CHpzC nmAV87Sj6BzysAB4o5GUHsmI8lMtHdrqB+7GmPY9kPBd9MsE/EbK9a6ycaUWeWmCWuQz NC+tpjgFOeieILdL0iSaB5RDSo4cGQZCrAtQicygFAq1zkyVAmPPNZVBiQ7MJD9AnTUG Widjn35ueTe9YxfHfNI/sDIPJ0J21k7FS/+qNRfnr+z6/jV+BXuBokKctyO4A83JBsid P5LQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si5652646plp.584.2017.09.26.05.18.20; Tue, 26 Sep 2017 05:18:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030578AbdIZMST (ORCPT + 6 others); Tue, 26 Sep 2017 08:18:19 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:52149 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968590AbdIZMSQ (ORCPT ); Tue, 26 Sep 2017 08:18:16 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id B23202088F; Tue, 26 Sep 2017 14:18:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 2E95A20890; Tue, 26 Sep 2017 14:17:56 +0200 (CEST) From: Quentin Schulz To: linus.walleij@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, lee.jones@linaro.org Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, thomas.petazzoni@free-electrons.com, Quentin Schulz Subject: [PATCH v2 07/10] mfd: axp20x: add pinctrl cell for AXP813 Date: Tue, 26 Sep 2017 14:17:17 +0200 Message-Id: <5345a2e94013f4e4f7b545cd4d84b098bd2fa349.1506428208.git-series.quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org As pinctrl and GPIO driver now supports AXP813, add a cell for it. Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 3 +++ 1 file changed, 3 insertions(+) -- git-series 0.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" 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/mfd/axp20x.c b/drivers/mfd/axp20x.c index 336de66..a457528 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -876,6 +876,9 @@ static struct mfd_cell axp813_cells[] = { .name = "axp221-pek", .num_resources = ARRAY_SIZE(axp803_pek_resources), .resources = axp803_pek_resources, + }, { + .name = "axp20x-gpio", + .of_compatible = "x-powers,axp813-pctl", } };