linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
	kernel@pengutronix.de, Fabio Estevam <fabio.estevam@nxp.com>
Subject: Re: [PATCH] ARM: dts: imx28: add gpio-ranges for internal gpio controller
Date: Thu, 11 May 2017 15:51:36 +0800	[thread overview]
Message-ID: <20170511075135.GF5833@dragon> (raw)
In-Reply-To: <20170508085925.18342-1-u.kleine-koenig@pengutronix.de>

On Mon, May 08, 2017 at 10:59:25AM +0200, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
> 
> with this patch applied I get the following lines in dmesg which looks
> fine:
> 
> 	[    0.227913] gpio gpiochip0: (80018000.pinctrl:gpio@0): created GPIO range 0->31 ==> 80018000.pinctrl PIN 0->31
> 	[    0.236100] gpio gpiochip1: (80018000.pinctrl:gpio@1): created GPIO range 0->31 ==> 80018000.pinctrl PIN 32->63
> 	[    0.244463] gpio gpiochip2: (80018000.pinctrl:gpio@2): created GPIO range 0->31 ==> 80018000.pinctrl PIN 64->95
> 	[    0.253020] gpio gpiochip3: (80018000.pinctrl:gpio@3): created GPIO range 0->31 ==> 80018000.pinctrl PIN 96->127
> 	[    0.261639] gpio gpiochip4: (80018000.pinctrl:gpio@4): created GPIO range 0->31 ==> 80018000.pinctrl PIN 128->159
> 
> But when looking at a used gpio
> 
> 	# cat /sys/kernel/debug/gpio
> 	gpiochip0: GPIOs 0-31, parent: platform/80018000.pinctrl:gpio@0, 80018000.pinctrl:gpio@0:
> 	...
> 	 gpio-20  (LED4                |?                   ) out hi
> 	...
> 
> 	# grep "pin 20 " /sys/kernel/debug/pinctrl/80018000.pinctrl/pinmux-pins
> 	pin 20 (GPMI_RDY0): leds (GPIO UNCLAIMED) function leds group leds.0
> 
> I wonder why there is still "GPIO UNCLAIMED". I would have expected that
> this disappears and somehow references the gpio_request issued by the
> led-gpio driver after my patch.
> 
> What am I missing?

It seems that's only the case where @strict of struct pinmux_ops is
true.  We should set it true for pinctrl-mxs, I guess?

Shawn

> 
> Best regards
> Uwe
> 
>  arch/arm/boot/dts/imx28.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
> index 148fcf4d3b98..cfad2295cc46 100644
> --- a/arch/arm/boot/dts/imx28.dtsi
> +++ b/arch/arm/boot/dts/imx28.dtsi
> @@ -182,6 +182,7 @@
>  					#gpio-cells = <2>;
>  					interrupt-controller;
>  					#interrupt-cells = <2>;
> +					gpio-ranges = <&pinctrl 0 0 32>;
>  				};
>  
>  				gpio1: gpio@1 {
> @@ -192,6 +193,7 @@
>  					#gpio-cells = <2>;
>  					interrupt-controller;
>  					#interrupt-cells = <2>;
> +					gpio-ranges = <&pinctrl 0 32 32>;
>  				};
>  
>  				gpio2: gpio@2 {
> @@ -202,6 +204,7 @@
>  					#gpio-cells = <2>;
>  					interrupt-controller;
>  					#interrupt-cells = <2>;
> +					gpio-ranges = <&pinctrl 0 64 32>;
>  				};
>  
>  				gpio3: gpio@3 {
> @@ -212,6 +215,7 @@
>  					#gpio-cells = <2>;
>  					interrupt-controller;
>  					#interrupt-cells = <2>;
> +					gpio-ranges = <&pinctrl 0 96 32>;
>  				};
>  
>  				gpio4: gpio@4 {
> @@ -222,6 +226,7 @@
>  					#gpio-cells = <2>;
>  					interrupt-controller;
>  					#interrupt-cells = <2>;
> +					gpio-ranges = <&pinctrl 0 128 32>;
>  				};
>  
>  				duart_pins_a: duart@0 {
> -- 
> 2.11.0
> 

  reply	other threads:[~2017-05-11  7:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08  8:59 [PATCH] ARM: dts: imx28: add gpio-ranges for internal gpio controller Uwe Kleine-König
2017-05-11  7:51 ` Shawn Guo [this message]
2017-05-11  8:09   ` Uwe Kleine-König
2017-05-12  3:05     ` Shawn Guo
2017-05-12  8:01       ` Uwe Kleine-König
2017-05-15  2:21         ` Shawn Guo
2017-05-15  7:16           ` Uwe Kleine-König
2017-05-22 15:54             ` 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=20170511075135.GF5833@dragon \
    --to=shawnguo@kernel.org \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).