* [PATCH 0/2] Update interrupt names
@ 2018-02-28 10:51 Bich HEMON
2018-02-28 10:51 ` [PATCH 2/2] serial: stm32: update interrupt initialization Bich HEMON
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Bich HEMON @ 2018-02-28 10:51 UTC (permalink / raw)
To: linux-arm-kernel
This patchset updates existing stm32 usart driver by updating interrupt
initialization by name.
Bich Hemon (2):
dt-bindings: serial: stm32: add wakeup option using note
serial: stm32: update interrupt initialization
Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 4 ++++
drivers/tty/serial/stm32-usart.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] serial: stm32: update interrupt initialization
2018-02-28 10:51 [PATCH 0/2] Update interrupt names Bich HEMON
@ 2018-02-28 10:51 ` Bich HEMON
2018-02-28 15:40 ` Andy Shevchenko
2018-03-06 0:50 ` Rob Herring
2018-02-28 10:51 ` [PATCH 1/2] dt-bindings: serial: stm32: add wakeup option using note Bich HEMON
2018-03-06 9:58 ` [PATCH 0/2] Update interrupt names Bich HEMON
2 siblings, 2 replies; 8+ messages in thread
From: Bich HEMON @ 2018-02-28 10:51 UTC (permalink / raw)
To: linux-arm-kernel
For each port, get each IRQ using its specific name instead of its index.
Signed-off-by: Bich Hemon <bich.hemon@st.com>
---
drivers/tty/serial/stm32-usart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 0fa735b..5c85cbc 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -680,8 +680,8 @@ static int stm32_init_port(struct stm32_port *stm32port,
port->flags = UPF_BOOT_AUTOCONF;
port->ops = &stm32_uart_ops;
port->dev = &pdev->dev;
- port->irq = platform_get_irq(pdev, 0);
- stm32port->wakeirq = platform_get_irq(pdev, 1);
+ port->irq = platform_get_irq_byname(pdev, "event");
+ stm32port->wakeirq = platform_get_irq_byname(pdev, "wakeup");
stm32port->fifoen = stm32port->info->cfg.has_fifo;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] dt-bindings: serial: stm32: add wakeup option using note
2018-02-28 10:51 [PATCH 0/2] Update interrupt names Bich HEMON
2018-02-28 10:51 ` [PATCH 2/2] serial: stm32: update interrupt initialization Bich HEMON
@ 2018-02-28 10:51 ` Bich HEMON
2018-03-06 0:52 ` Rob Herring
2018-03-06 9:58 ` [PATCH 0/2] Update interrupt names Bich HEMON
2 siblings, 1 reply; 8+ messages in thread
From: Bich HEMON @ 2018-02-28 10:51 UTC (permalink / raw)
To: linux-arm-kernel
Update bindings with interrupt-names and wakeup-source information
Signed-off-by: Bich Hemon <bich.hemon@st.com>
---
Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt
index d150b04..aaeb564 100644
--- a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt
+++ b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt
@@ -10,6 +10,7 @@ Required properties:
- interrupts:
- The interrupt line for the USART instance,
- An optional wake-up interrupt.
+- interrupt-names: Contains "event" for the USART interrupt line.
- clocks: The input clock of the USART instance
Optional properties:
@@ -17,6 +18,9 @@ Optional properties:
- st,hw-flow-ctrl: bool flag to enable hardware flow control.
- dmas: phandle(s) to DMA controller node(s). Refer to stm32-dma.txt
- dma-names: "rx" and/or "tx"
+- wakeup-source: bool flag to indicate this device has wakeup capabilities
+- interrupt-names : Should contain "wakeup" if optional wake-up interrupt is
+ used.
Examples:
usart4: serial at 40004c00 {
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] serial: stm32: update interrupt initialization
2018-02-28 10:51 ` [PATCH 2/2] serial: stm32: update interrupt initialization Bich HEMON
@ 2018-02-28 15:40 ` Andy Shevchenko
2018-02-28 15:41 ` Andy Shevchenko
2018-03-06 0:50 ` Rob Herring
1 sibling, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2018-02-28 15:40 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Feb 28, 2018 at 12:51 PM, Bich HEMON <bich.hemon@st.com> wrote:
> For each port, get each IRQ using its specific name instead of its index.
>
> Signed-off-by: Bich Hemon <bich.hemon@st.com>
> ---
> drivers/tty/serial/stm32-usart.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
> index 0fa735b..5c85cbc 100644
> --- a/drivers/tty/serial/stm32-usart.c
> +++ b/drivers/tty/serial/stm32-usart.c
> @@ -680,8 +680,8 @@ static int stm32_init_port(struct stm32_port *stm32port,
> port->flags = UPF_BOOT_AUTOCONF;
> port->ops = &stm32_uart_ops;
> port->dev = &pdev->dev;
> - port->irq = platform_get_irq(pdev, 0);
> - stm32port->wakeirq = platform_get_irq(pdev, 1);
> + port->irq = platform_get_irq_byname(pdev, "event");
This is I have no idea about...
> + stm32port->wakeirq = platform_get_irq_byname(pdev, "wakeup");
But this one is redundant since Tony's patch:
https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=da997b22c40473b7db60bde6ea188d35565d10c8
> stm32port->fifoen = stm32port->info->cfg.has_fifo;
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> --
> 1.9.1
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] serial: stm32: update interrupt initialization
2018-02-28 15:40 ` Andy Shevchenko
@ 2018-02-28 15:41 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2018-02-28 15:41 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Feb 28, 2018 at 5:40 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Wed, Feb 28, 2018 at 12:51 PM, Bich HEMON <bich.hemon@st.com> wrote:
>> - port->irq = platform_get_irq(pdev, 0);
>> - stm32port->wakeirq = platform_get_irq(pdev, 1);
>> + stm32port->wakeirq = platform_get_irq_byname(pdev, "wakeup");
>
> But this one is redundant since Tony's patch:
> https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=da997b22c40473b7db60bde6ea188d35565d10c8
Oh, it'a bout getting a resource by name...
Sorry, discard my previous comment.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] serial: stm32: update interrupt initialization
2018-02-28 10:51 ` [PATCH 2/2] serial: stm32: update interrupt initialization Bich HEMON
2018-02-28 15:40 ` Andy Shevchenko
@ 2018-03-06 0:50 ` Rob Herring
1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring @ 2018-03-06 0:50 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Feb 28, 2018 at 10:51:17AM +0000, Bich HEMON wrote:
> For each port, get each IRQ using its specific name instead of its index.
>
> Signed-off-by: Bich Hemon <bich.hemon@st.com>
> ---
> drivers/tty/serial/stm32-usart.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
> index 0fa735b..5c85cbc 100644
> --- a/drivers/tty/serial/stm32-usart.c
> +++ b/drivers/tty/serial/stm32-usart.c
> @@ -680,8 +680,8 @@ static int stm32_init_port(struct stm32_port *stm32port,
> port->flags = UPF_BOOT_AUTOCONF;
> port->ops = &stm32_uart_ops;
> port->dev = &pdev->dev;
> - port->irq = platform_get_irq(pdev, 0);
> - stm32port->wakeirq = platform_get_irq(pdev, 1);
> + port->irq = platform_get_irq_byname(pdev, "event");
> + stm32port->wakeirq = platform_get_irq_byname(pdev, "wakeup");
This change is not necessary. The interrupts should be at fixed indices.
> stm32port->fifoen = stm32port->info->cfg.has_fifo;
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> --
> 1.9.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] dt-bindings: serial: stm32: add wakeup option using note
2018-02-28 10:51 ` [PATCH 1/2] dt-bindings: serial: stm32: add wakeup option using note Bich HEMON
@ 2018-03-06 0:52 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2018-03-06 0:52 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Feb 28, 2018 at 10:51:17AM +0000, Bich HEMON wrote:
> Update bindings with interrupt-names and wakeup-source information
>
> Signed-off-by: Bich Hemon <bich.hemon@st.com>
> ---
> Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt
> index d150b04..aaeb564 100644
> --- a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt
> +++ b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt
> @@ -10,6 +10,7 @@ Required properties:
> - interrupts:
> - The interrupt line for the USART instance,
> - An optional wake-up interrupt.
> +- interrupt-names: Contains "event" for the USART interrupt line.
This should be moved down into optional properties.
> - clocks: The input clock of the USART instance
>
> Optional properties:
> @@ -17,6 +18,9 @@ Optional properties:
> - st,hw-flow-ctrl: bool flag to enable hardware flow control.
> - dmas: phandle(s) to DMA controller node(s). Refer to stm32-dma.txt
> - dma-names: "rx" and/or "tx"
> +- wakeup-source: bool flag to indicate this device has wakeup capabilities
> +- interrupt-names : Should contain "wakeup" if optional wake-up interrupt is
> + used.
>
> Examples:
> usart4: serial at 40004c00 {
> --
> 1.9.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] Update interrupt names
2018-02-28 10:51 [PATCH 0/2] Update interrupt names Bich HEMON
2018-02-28 10:51 ` [PATCH 2/2] serial: stm32: update interrupt initialization Bich HEMON
2018-02-28 10:51 ` [PATCH 1/2] dt-bindings: serial: stm32: add wakeup option using note Bich HEMON
@ 2018-03-06 9:58 ` Bich HEMON
2 siblings, 0 replies; 8+ messages in thread
From: Bich HEMON @ 2018-03-06 9:58 UTC (permalink / raw)
To: linux-arm-kernel
Hi all,
On 02/28/2018 11:51 AM, Bich HEMON wrote:
> This patchset updates existing stm32 usart driver by updating interrupt
> initialization by name.
>
> Bich Hemon (2):
> dt-bindings: serial: stm32: add wakeup option using note
> serial: stm32: update interrupt initialization
>
> Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 4 ++++
> drivers/tty/serial/stm32-usart.c | 4 ++--
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
Please note that this patch set is abandoned. As Rob pointed that out,
the interrupt indices are fixed, so there is no need to keep these patches.
Best regards,
Bich
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-03-06 9:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 10:51 [PATCH 0/2] Update interrupt names Bich HEMON
2018-02-28 10:51 ` [PATCH 2/2] serial: stm32: update interrupt initialization Bich HEMON
2018-02-28 15:40 ` Andy Shevchenko
2018-02-28 15:41 ` Andy Shevchenko
2018-03-06 0:50 ` Rob Herring
2018-02-28 10:51 ` [PATCH 1/2] dt-bindings: serial: stm32: add wakeup option using note Bich HEMON
2018-03-06 0:52 ` Rob Herring
2018-03-06 9:58 ` [PATCH 0/2] Update interrupt names Bich HEMON
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).