linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Have Tegra's GPIO chip depend explicitly on the pinctrl device
@ 2015-07-14  8:29 Tomeu Vizoso
  2015-07-14  8:29 ` [PATCH v2 3/3] ARM: tegra: Add gpio-ranges property Tomeu Vizoso
  2015-08-13 14:33 ` [PATCH v2 0/3] Have Tegra's GPIO chip depend explicitly on the pinctrl device Thierry Reding
  0 siblings, 2 replies; 3+ messages in thread
From: Tomeu Vizoso @ 2015-07-14  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

these three patches make sure that there's an explicit dependency from
the GPIO chip in Tegra SoCs to the corresponding pinctrl device, without
having duplicated gpio ranges.

By having an explicit dependency, we can do things such as probing the
pinctrl device before the GPIO chip device to avoid deferred probes.

Thanks,

Tomeu

Changes in v2:
- Don't defer probe if the pinctrl node is disabled
- Remove outdated comment from the commit changelog

Tomeu Vizoso (3):
  gpio: defer probe if pinctrl cannot be found
  pinctrl: tegra: Only set the gpio range if needed
  ARM: tegra: Add gpio-ranges property

 arch/arm/boot/dts/tegra114.dtsi |  1 +
 arch/arm/boot/dts/tegra124.dtsi |  1 +
 arch/arm/boot/dts/tegra20.dtsi  |  1 +
 arch/arm/boot/dts/tegra30.dtsi  |  1 +
 drivers/gpio/gpiolib-of.c       | 27 ++++++++++++++++++---------
 drivers/gpio/gpiolib.c          |  5 ++++-
 drivers/pinctrl/pinctrl-tegra.c | 19 ++++++++++++++++++-
 include/linux/of_gpio.h         |  4 ++--
 8 files changed, 46 insertions(+), 13 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 3/3] ARM: tegra: Add gpio-ranges property
  2015-07-14  8:29 [PATCH v2 0/3] Have Tegra's GPIO chip depend explicitly on the pinctrl device Tomeu Vizoso
@ 2015-07-14  8:29 ` Tomeu Vizoso
  2015-08-13 14:33 ` [PATCH v2 0/3] Have Tegra's GPIO chip depend explicitly on the pinctrl device Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Tomeu Vizoso @ 2015-07-14  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

Specify how the GPIOs map to the pins in Tegra SoCs, so the dependency is
explicit.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
---

Changes in v2:
- Remove outdated comment from the commit changelog

 arch/arm/boot/dts/tegra114.dtsi | 1 +
 arch/arm/boot/dts/tegra124.dtsi | 1 +
 arch/arm/boot/dts/tegra20.dtsi  | 1 +
 arch/arm/boot/dts/tegra30.dtsi  | 1 +
 4 files changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index f58a3d9d5f13..7e1e1717e46a 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -234,6 +234,7 @@
 		gpio-controller;
 		#interrupt-cells = <2>;
 		interrupt-controller;
+		gpio-ranges = <&pinmux 0 0 246>;
 	};
 
 	apbmisc at 70000800 {
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index 87318a72f615..4779df336cb6 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -255,6 +255,7 @@
 		gpio-controller;
 		#interrupt-cells = <2>;
 		interrupt-controller;
+		gpio-ranges = <&pinmux 0 0 251>;
 	};
 
 	apbdma: dma at 0,60020000 {
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index f444b67f55c6..b44277c63e8e 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -244,6 +244,7 @@
 		gpio-controller;
 		#interrupt-cells = <2>;
 		interrupt-controller;
+		gpio-ranges = <&pinmux 0 0 224>;
 	};
 
 	apbmisc at 70000800 {
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 782b11b2af6a..28c547f27ecd 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -349,6 +349,7 @@
 		gpio-controller;
 		#interrupt-cells = <2>;
 		interrupt-controller;
+		gpio-ranges = <&pinmux 0 0 248>;
 	};
 
 	apbmisc at 70000800 {
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 0/3] Have Tegra's GPIO chip depend explicitly on the pinctrl device
  2015-07-14  8:29 [PATCH v2 0/3] Have Tegra's GPIO chip depend explicitly on the pinctrl device Tomeu Vizoso
  2015-07-14  8:29 ` [PATCH v2 3/3] ARM: tegra: Add gpio-ranges property Tomeu Vizoso
@ 2015-08-13 14:33 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2015-08-13 14:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 14, 2015 at 10:29:53AM +0200, Tomeu Vizoso wrote:
> Hello,
> 
> these three patches make sure that there's an explicit dependency from
> the GPIO chip in Tegra SoCs to the corresponding pinctrl device, without
> having duplicated gpio ranges.
> 
> By having an explicit dependency, we can do things such as probing the
> pinctrl device before the GPIO chip device to avoid deferred probes.
> 
> Thanks,
> 
> Tomeu
> 
> Changes in v2:
> - Don't defer probe if the pinctrl node is disabled
> - Remove outdated comment from the commit changelog
> 
> Tomeu Vizoso (3):
>   gpio: defer probe if pinctrl cannot be found
>   pinctrl: tegra: Only set the gpio range if needed
>   ARM: tegra: Add gpio-ranges property

Patches 2 and 3 applied to the Tegra tree. Linus, I've applied the
pinctrl patch to a separate branch, so we could use that to resolve
conflicts, should there be any.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150813/d6be596e/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-13 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14  8:29 [PATCH v2 0/3] Have Tegra's GPIO chip depend explicitly on the pinctrl device Tomeu Vizoso
2015-07-14  8:29 ` [PATCH v2 3/3] ARM: tegra: Add gpio-ranges property Tomeu Vizoso
2015-08-13 14:33 ` [PATCH v2 0/3] Have Tegra's GPIO chip depend explicitly on the pinctrl device Thierry Reding

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).