linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] STM32 pinctrl: remove dependency between pinctrl driver and device tree
@ 2016-10-20 13:26 Alexandre TORGUE
  2016-10-20 13:26 ` [PATCH 1/2] pinctrl: stm32: remove dependency with interrupt controller Alexandre TORGUE
  2016-10-20 13:26 ` [PATCH 2/2] pinctrl: stm32: move gpio irqs binding to optional Alexandre TORGUE
  0 siblings, 2 replies; 5+ messages in thread
From: Alexandre TORGUE @ 2016-10-20 13:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi, 

Currently 4.9-rc1 is not booting correctly on STM32F4. 
By adding gpios irqs support to stm32 pinctrl, a dependency has been 
added between pinctrl stm32 and stm32f4 device tree (my mistake). 
This series breaks this dependency and has to be taken on 4.9_rcs. 

Regards
Alex


Alexandre TORGUE (2):
  pinctrl: stm32: remove dependency with interrupt controller
  pinctrl: stm32: move gpio irqs binding to optional

 Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt | 10 +++++-----
 drivers/pinctrl/stm32/pinctrl-stm32.c                          |  8 +++++---
 2 files changed, 10 insertions(+), 8 deletions(-)

-- 
1.9.1

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

* [PATCH 1/2] pinctrl: stm32: remove dependency with interrupt controller
  2016-10-20 13:26 [PATCH 0/2] STM32 pinctrl: remove dependency between pinctrl driver and device tree Alexandre TORGUE
@ 2016-10-20 13:26 ` Alexandre TORGUE
  2016-10-23 23:55   ` Linus Walleij
  2016-10-20 13:26 ` [PATCH 2/2] pinctrl: stm32: move gpio irqs binding to optional Alexandre TORGUE
  1 sibling, 1 reply; 5+ messages in thread
From: Alexandre TORGUE @ 2016-10-20 13:26 UTC (permalink / raw)
  To: linux-arm-kernel

This patch allows to probe stm32 pinctrl driver even if no interrupt
controller is defined to manage gpio irqs.

Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>

diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
index 200667f..efc4371 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -1092,9 +1092,11 @@ int stm32_pctl_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	ret = stm32_pctrl_dt_setup_irq(pdev, pctl);
-	if (ret)
-		return ret;
+	if (of_find_property(np, "interrupt-parent", NULL)) {
+		ret = stm32_pctrl_dt_setup_irq(pdev, pctl);
+		if (ret)
+			return ret;
+	}
 
 	for_each_child_of_node(np, child)
 		if (of_property_read_bool(child, "gpio-controller"))
-- 
1.9.1

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

* [PATCH 2/2] pinctrl: stm32: move gpio irqs binding to optional
  2016-10-20 13:26 [PATCH 0/2] STM32 pinctrl: remove dependency between pinctrl driver and device tree Alexandre TORGUE
  2016-10-20 13:26 ` [PATCH 1/2] pinctrl: stm32: remove dependency with interrupt controller Alexandre TORGUE
@ 2016-10-20 13:26 ` Alexandre TORGUE
  2016-10-23 23:56   ` Linus Walleij
  1 sibling, 1 reply; 5+ messages in thread
From: Alexandre TORGUE @ 2016-10-20 13:26 UTC (permalink / raw)
  To: linux-arm-kernel

stm32 pinctrl driver could be probed even if no interrupt controller
is defined to manage gpio irqs. Entries related to gpio irq management
are moved to optional.

Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>

diff --git a/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
index f9753c4..b24583a 100644
--- a/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
@@ -14,11 +14,6 @@ Required properies:
  - #size-cells	: The value of this property must be 1
  - ranges	: defines mapping between pin controller node (parent) to
    gpio-bank node (children).
- - interrupt-parent: phandle of the interrupt parent to which the external
-   GPIO interrupts are forwarded to.
- - st,syscfg: Should be phandle/offset pair. The phandle to the syscon node
-   which includes IRQ mux selection register, and the offset of the IRQ mux
-   selection register.
  - pins-are-numbered: Specify the subnodes are using numbered pinmux to
    specify pins.
 
@@ -37,6 +32,11 @@ Required properties:
 
 Optional properties:
  - reset:	  : Reference to the reset controller
+ - interrupt-parent: phandle of the interrupt parent to which the external
+   GPIO interrupts are forwarded to.
+ - st,syscfg: Should be phandle/offset pair. The phandle to the syscon node
+   which includes IRQ mux selection register, and the offset of the IRQ mux
+   selection register.
 
 Example:
 #include <dt-bindings/pinctrl/stm32f429-pinfunc.h>
-- 
1.9.1

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

* [PATCH 1/2] pinctrl: stm32: remove dependency with interrupt controller
  2016-10-20 13:26 ` [PATCH 1/2] pinctrl: stm32: remove dependency with interrupt controller Alexandre TORGUE
@ 2016-10-23 23:55   ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2016-10-23 23:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 20, 2016 at 3:26 PM, Alexandre TORGUE
<alexandre.torgue@st.com> wrote:

> This patch allows to probe stm32 pinctrl driver even if no interrupt
> controller is defined to manage gpio irqs.
>
> Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>

Patch applied for fixes.

Yours,
Linus Walleij

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

* [PATCH 2/2] pinctrl: stm32: move gpio irqs binding to optional
  2016-10-20 13:26 ` [PATCH 2/2] pinctrl: stm32: move gpio irqs binding to optional Alexandre TORGUE
@ 2016-10-23 23:56   ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2016-10-23 23:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 20, 2016 at 3:26 PM, Alexandre TORGUE
<alexandre.torgue@st.com> wrote:

> stm32 pinctrl driver could be probed even if no interrupt controller
> is defined to manage gpio irqs. Entries related to gpio irq management
> are moved to optional.
>
> Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>

Patch applied for fixes.

Yours,
Linus Walleij

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

end of thread, other threads:[~2016-10-23 23:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-20 13:26 [PATCH 0/2] STM32 pinctrl: remove dependency between pinctrl driver and device tree Alexandre TORGUE
2016-10-20 13:26 ` [PATCH 1/2] pinctrl: stm32: remove dependency with interrupt controller Alexandre TORGUE
2016-10-23 23:55   ` Linus Walleij
2016-10-20 13:26 ` [PATCH 2/2] pinctrl: stm32: move gpio irqs binding to optional Alexandre TORGUE
2016-10-23 23:56   ` Linus Walleij

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