public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: robh@kernel.org (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 02/12] pinctrl: axp209: add pinctrl features
Date: Tue, 10 Oct 2017 13:15:22 -0500	[thread overview]
Message-ID: <20171010181522.y7moibamlghiw3lf@rob-hp-laptop> (raw)
In-Reply-To: <20171002120854.5212-3-quentin.schulz@free-electrons.com>

On Mon, Oct 02, 2017 at 02:08:44PM +0200, Quentin Schulz wrote:
> 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>
> ---
>  .../devicetree/bindings/pinctrl/pinctrl-axp209.txt |  28 +-

In the future, please split bindings to separate patch.

>  drivers/pinctrl/pinctrl-axp209.c                   | 293 +++++++++++++++++++--
>  2 files changed, 300 insertions(+), 21 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt
> index a6611304dd3c..388c04492afd 100644
> --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-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 at 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 {

Use '-' rather than '_' for node names.

With that,

Acked-by: Rob Herring <robh@kernel.org>

> +		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

  parent reply	other threads:[~2017-10-10 18:15 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 12:08 [PATCH v3 00/12] add pinmuxing support for pins in AXP209 and AXP813 PMICs Quentin Schulz
2017-10-02 12:08 ` [PATCH v3 01/12] pinctrl: move gpio-axp209 to pinctrl Quentin Schulz
2017-10-02 20:18   ` Maxime Ripard
2017-10-03  9:01     ` Chen-Yu Tsai
2017-10-02 12:08 ` [PATCH v3 02/12] pinctrl: axp209: add pinctrl features Quentin Schulz
2017-10-02 20:37   ` Maxime Ripard
2017-10-10 18:15   ` Rob Herring [this message]
2017-10-02 12:08 ` [PATCH v3 03/12] pinctrl: axp209: rename everything from gpio to pctl Quentin Schulz
2017-10-02 12:08 ` [PATCH v3 04/12] pinctrl: axp209: add programmable gpio_status_offset Quentin Schulz
2017-10-02 20:38   ` Maxime Ripard
2017-10-03  9:01     ` Chen-Yu Tsai
2017-10-02 12:08 ` [PATCH v3 05/12] pinctrl: axp209: add support for AXP813 GPIOs Quentin Schulz
2017-10-02 20:38   ` Maxime Ripard
2017-10-10 18:33   ` Rob Herring
2017-10-02 12:08 ` [PATCH v3 06/12] mfd: axp20x: add pinctrl cell for AXP813 Quentin Schulz
2017-10-02 20:39   ` Maxime Ripard
2017-10-02 12:08 ` [PATCH v3 07/12] ARM: dts: sun8i: a711: include axp81x dtsi Quentin Schulz
2017-10-02 20:40   ` Maxime Ripard
2017-10-02 12:08 ` [PATCH v3 08/12] ARM: dts: sun8i: bananapi-m3: " Quentin Schulz
2017-10-02 12:08 ` [PATCH v3 09/12] ARM: dts: sun8i: h8homlet-v2: " Quentin Schulz
2017-10-02 12:08 ` [PATCH v3 10/12] ARM: dts: sun8i: cubietruck-plus: " Quentin Schulz
2017-10-02 12:08 ` [PATCH v3 11/12] ARM: dtsi: axp81x: add GPIO DT node Quentin Schulz
2017-10-02 12:08 ` [PATCH v3 12/12] ARM: dtsi: axp81x: set pinmux for GPIO0/1 when used as LDOs Quentin Schulz
2017-10-02 20:42   ` Maxime Ripard
2017-10-03  2:06     ` Chen-Yu Tsai
2017-10-03  9:18       ` Russell King - ARM Linux
2017-10-03 14:43         ` Maxime Ripard
2017-10-03  9:27   ` Linus Walleij
2017-10-03 14:47     ` Maxime Ripard
2017-10-03 15:08       ` Chen-Yu Tsai
2017-10-04  7:35         ` Quentin Schulz
2017-10-10  3:09           ` Chen-Yu Tsai
2017-10-11 12:00             ` Maxime Ripard
2017-10-11 19:09               ` Linus Walleij
2017-10-12  2:22                 ` Chen-Yu Tsai
2017-10-11  7:43           ` Linus Walleij
2017-10-07 10:48 ` [PATCH v3 00/12] add pinmuxing support for pins in AXP209 and AXP813 PMICs Linus Walleij

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=20171010181522.y7moibamlghiw3lf@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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