linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@free-electrons.com>
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,
	thomas.petazzoni@free-electrons.com,
	linux-sunxi@googlegroups.com,
	Quentin Schulz <quentin.schulz@free-electrons.com>
Subject: [PATCH v4 03/10] dt-bindings: gpio: gpio-axp209: add pinctrl features
Date: Fri,  1 Dec 2017 14:44:44 +0100	[thread overview]
Message-ID: <7fdc42fd2d3572069292ebe1376bb446beb4d8a9.1512135804.git-series.quentin.schulz@free-electrons.com> (raw)
In-Reply-To: <cover.3ff63fdf302c6bda02ea7d160ad2aa5afee0899d.1512135804.git-series.quentin.schulz@free-electrons.com>
In-Reply-To: <cover.3ff63fdf302c6bda02ea7d160ad2aa5afee0899d.1512135804.git-series.quentin.schulz@free-electrons.com>

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 <quentin.schulz@free-electrons.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 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
-- 
git-series 0.9.1

  parent reply	other threads:[~2017-12-01 13:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 13:44 [PATCH v4 00/10] add pinmuxing support for pins in AXP209 and AXP813 PMICs Quentin Schulz
2017-12-01 13:44 ` [PATCH v4 01/10] pinctrl: move gpio-axp209 to pinctrl Quentin Schulz
2017-12-01 13:44 ` [PATCH v4 02/10] pinctrl: axp209: add pinctrl features Quentin Schulz
2017-12-01 15:57   ` Maxime Ripard
2017-12-04  8:07     ` Quentin Schulz
2017-12-05  8:53       ` Maxime Ripard
2017-12-05 23:21   ` kbuild test robot
2017-12-01 13:44 ` Quentin Schulz [this message]
2017-12-02 15:55   ` [PATCH v4 03/10] dt-bindings: gpio: gpio-axp209: " Linus Walleij
2017-12-01 13:44 ` [PATCH v4 04/10] pinctrl: axp209: rename everything from gpio to pctl Quentin Schulz
2017-12-01 13:44 ` [PATCH v4 05/10] pinctrl: axp209: add programmable gpio_status_offset Quentin Schulz
2017-12-01 13:44 ` [PATCH v4 06/10] pinctrl: axp209: add programmable ADC muxing value Quentin Schulz
2017-12-01 15:57   ` Maxime Ripard
2017-12-01 13:44 ` [PATCH v4 07/10] pinctrl: axp209: add support for AXP813 GPIOs Quentin Schulz
2017-12-01 13:44 ` [PATCH v4 08/10] mfd: axp20x: add pinctrl cell for AXP813 Quentin Schulz
2017-12-02 15:57   ` Linus Walleij
2017-12-04  9:02     ` Lee Jones
2017-12-01 13:44 ` [PATCH v4 09/10] ARM: dtsi: axp81x: add GPIO DT node Quentin Schulz
2017-12-02 15:58   ` Linus Walleij
2017-12-05  9:24   ` [linux-sunxi] " Chen-Yu Tsai
2017-12-05  9:39     ` Maxime Ripard
2017-12-01 13:44 ` [PATCH v4 10/10] ARM: dtsi: axp81x: set pinmux for GPIO0/1 when used as LDOs Quentin Schulz
2017-12-01 15:58   ` Maxime Ripard
2017-12-05  9:25     ` Chen-Yu Tsai
2017-12-02 16:00 ` [PATCH v4 00/10] add pinmuxing support for pins in AXP209 and AXP813 PMICs Linus Walleij
2017-12-05  8:55   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7fdc42fd2d3572069292ebe1376bb446beb4d8a9.1512135804.git-series.quentin.schulz@free-electrons.com \
    --to=quentin.schulz@free-electrons.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=robh+dt@kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).