From patchwork Fri Dec 1 13:44:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 10087225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3BA13603B4 for ; Fri, 1 Dec 2017 14:06:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38CBA2A54F for ; Fri, 1 Dec 2017 14:06:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DA392A55C; Fri, 1 Dec 2017 14:06:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B93882A54F for ; Fri, 1 Dec 2017 14:06:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=38z3fPxCZZjulCtXpIN+Y3mktO+RScDzQgNegpsTZ4s=; b=g6KNbhojEh2IdwG5zsGPgXS6it ubsDUA5QcotB/se42KVxbBX0dR1WJhquTqiWezNVDJEVhPxobLOtqH8f9vNAeKNd1vYkc6eOGqJAb VvYfULsx7Ye+w7gdDzdaINvPXKogByLhaUV0EuYd2Gjw7hPres1fPblcsMoAGRHShYUtuutt8JqkD CUeX+XBZmb7r6dOJQad8YGET8wYmg5cw4XL/lK9r3AOcPqOm8XWSqkJO6pJwwCdS1C3IpflbkoFSU 5cezfG9VSAWYWCA7e4MMZENgwFJdO0ZXHQSWh72hZZDRgH+OK4SUxqLOVdg8Dz1VhfJyaVlYzMtUb CoWLs2kw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKlxk-0007P7-OT; Fri, 01 Dec 2017 14:06:44 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKlwi-0006I2-UY for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Dec 2017 14:05:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5BpkQRdheLoSYHqBpXDd0b60cL3O/TkQhx7/bCAGz30=; b=J86IoKPzs1PwHfic2+e40xc+p qJaDN/iDjUIF7mz1Z4+3o+9E2p57ZCQeyHTtzNqkwsK1SybuS8vrs44HxKXj9uV521qlGCEo/m/pH D3SKW9uAXgHAlq/iktwqqQBTjwPQsBu/mSFkg3e6NJQ/0jO4ldk0haAbz/Zf3/uCLvml6VmKPg7wy A2l28r4IlURklGyFKg/1gkXRFQlG2blypa0wVbsIsnSAwwCW2hVUIHUYWu1CS5aLmo9JMlrmu9p8T 6Ab9J0YTl83fYLL42AK4rdQwv717L1+ry1bLw+vAbeOSaugeKW8LWN+7449ojGO9E7ZeM+cZ9TQ1V zB8j8Td5g==; Received: from mail.free-electrons.com ([62.4.15.54]) by merlin.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKldu-0004me-Gd for linux-arm-kernel@lists.infradead.org; Fri, 01 Dec 2017 13:46:15 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 55FF5209E9; Fri, 1 Dec 2017 14:45:49 +0100 (CET) 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 F405E2097F; Fri, 1 Dec 2017 14:45:38 +0100 (CET) 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 Subject: [PATCH v4 03/10] dt-bindings: gpio: gpio-axp209: add pinctrl features Date: Fri, 1 Dec 2017 14:44:44 +0100 Message-Id: <7fdc42fd2d3572069292ebe1376bb446beb4d8a9.1512135804.git-series.quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, devicetree@vger.kernel.org, Quentin Schulz , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz Acked-by: Rob Herring --- Documentation/devicetree/bindings/gpio/gpio-axp209.txt | 28 ++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio-axp209.txt b/Documentation/devicetree/bindings/gpio/gpio-axp209.txt index a661130..4705020 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-axp209.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-axp209.txt @@ -1,4 +1,4 @@ -AXP209 GPIO controller +AXP209 GPIO & pinctrl controller This driver follows the usual GPIO bindings found in Documentation/devicetree/bindings/gpio/gpio.txt @@ -28,3 +28,29 @@ axp209: pmic@34 { #gpio-cells = <2>; }; }; + +The GPIOs can be muxed to other functions and therefore, must be a subnode of +axp_gpio. + +Example: + +&axp_gpio { + gpio0_adc: gpio0-adc { + pins = "GPIO0"; + function = "adc"; + }; +}; + +&example_node { + pinctrl-names = "default"; + pinctrl-0 = <&gpio0_adc>; +}; + +GPIOs and their functions +------------------------- + +GPIO | Functions +------------------------ +GPIO0 | gpio_in, gpio_out, ldo, adc +GPIO1 | gpio_in, gpio_out, ldo, adc +GPIO2 | gpio_in, gpio_out