* [PATCH 00/05] gpio: R-Car and EM GPIO update V2
@ 2013-11-20 0:22 Magnus Damm
2013-11-20 0:23 ` [PATCH 01/05 v2] gpio: rcar: Use lazy disable Magnus Damm
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Magnus Damm @ 2013-11-20 0:22 UTC (permalink / raw)
To: linux-kernel
Cc: linux-sh, linus.walleij, grant.likely, horms, laurent.pinchart,
Magnus Damm
gpio: R-Car and EM GPIO update V2
[PATCH 01/05 v2] gpio: rcar: Use lazy disable
[PATCH 02/05 v2] gpio: rcar: Enable mask on suspend
[PATCH 03/05] gpio: em: Setup gpiochip->dev
[PATCH 04/05 v2] gpio: em: Use lazy disable
[PATCH 05/05 v2] gpio: em: Enable mask on suspend
Update the R-Car GPIO driver and the GPIO driver used on EMEV2 to use lazy
disable and mask on suspend. This fixes the Suspend-to-RAM behavior to make
sure wakeup sources are left enabled while suspending. Also include a small
fix for gpio-em that fixes the DT use case.
Thanks to Laurent and Linus for feedback.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
Written against renesas.git tag renesas-devel-v3.12-20131119
Changes since V1:
- Split lazy disable and mask on suspend patches
- Improved commit messages
drivers/gpio/gpio-em.c | 5 ++---
drivers/gpio/gpio-rcar.c | 5 ++---
2 files changed, 4 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 01/05 v2] gpio: rcar: Use lazy disable
2013-11-20 0:22 [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Magnus Damm
@ 2013-11-20 0:23 ` Magnus Damm
2013-11-20 13:34 ` Linus Walleij
2013-11-20 0:23 ` [PATCH 02/05 v2] gpio: rcar: Enable mask on suspend Magnus Damm
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Magnus Damm @ 2013-11-20 0:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-sh, linus.walleij, grant.likely, horms, laurent.pinchart,
Magnus Damm
From: Magnus Damm <damm@opensource.se>
Set the ->irq_enable() and ->irq_disable() methods to NULL
to enable lazy disable of interrupts. This by itself provides
some level of optimization, but is mainly enabled as ground
work for future Suspend-to-RAM wake up support.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/gpio/gpio-rcar.c | 2 --
1 file changed, 2 deletions(-)
--- 0001/drivers/gpio/gpio-rcar.c
+++ work/drivers/gpio/gpio-rcar.c 2013-11-20 08:28:20.000000000 +0900
@@ -368,8 +368,6 @@ static int gpio_rcar_probe(struct platfo
irq_chip->name = name;
irq_chip->irq_mask = gpio_rcar_irq_disable;
irq_chip->irq_unmask = gpio_rcar_irq_enable;
- irq_chip->irq_enable = gpio_rcar_irq_enable;
- irq_chip->irq_disable = gpio_rcar_irq_disable;
irq_chip->irq_set_type = gpio_rcar_irq_set_type;
irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_SET_TYPE_MASKED;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 02/05 v2] gpio: rcar: Enable mask on suspend
2013-11-20 0:22 [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Magnus Damm
2013-11-20 0:23 ` [PATCH 01/05 v2] gpio: rcar: Use lazy disable Magnus Damm
@ 2013-11-20 0:23 ` Magnus Damm
2013-11-20 13:37 ` Linus Walleij
2013-11-20 0:23 ` [PATCH 03/05] gpio: em: Setup gpiochip->dev Magnus Damm
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Magnus Damm @ 2013-11-20 0:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-sh, linus.walleij, grant.likely, horms, laurent.pinchart,
Magnus Damm
From: Magnus Damm <damm@opensource.se>
Now when lazy interrupt disable has been enabled in the driver
then extend the code to set IRQCHIP_MASK_ON_SUSPEND which tells
the core that only IRQs marked as wakeups need to stay enabled
during Suspend-to-RAM.
Tested on the Lager board with GPIO-keys and Suspend-to-RAM.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/gpio/gpio-rcar.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- 0008/drivers/gpio/gpio-rcar.c
+++ work/drivers/gpio/gpio-rcar.c 2013-11-20 08:30:28.000000000 +0900
@@ -369,7 +369,8 @@ static int gpio_rcar_probe(struct platfo
irq_chip->irq_mask = gpio_rcar_irq_disable;
irq_chip->irq_unmask = gpio_rcar_irq_enable;
irq_chip->irq_set_type = gpio_rcar_irq_set_type;
- irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_SET_TYPE_MASKED;
+ irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_SET_TYPE_MASKED
+ | IRQCHIP_MASK_ON_SUSPEND;
p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
p->config.number_of_pins,
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 03/05] gpio: em: Setup gpiochip->dev
2013-11-20 0:22 [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Magnus Damm
2013-11-20 0:23 ` [PATCH 01/05 v2] gpio: rcar: Use lazy disable Magnus Damm
2013-11-20 0:23 ` [PATCH 02/05 v2] gpio: rcar: Enable mask on suspend Magnus Damm
@ 2013-11-20 0:23 ` Magnus Damm
2013-11-20 13:38 ` Linus Walleij
2013-11-20 0:23 ` [PATCH 04/05 v2] gpio: em: Use lazy disable Magnus Damm
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Magnus Damm @ 2013-11-20 0:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-sh, linus.walleij, grant.likely, horms, laurent.pinchart,
Magnus Damm
From: Magnus Damm <damm@opensource.se>
Make sure gpio_chip->dev is setup so of_gpiochip_add()
will work as expected.
Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/gpio/gpio-em.c | 1 +
1 file changed, 1 insertion(+)
--- 0001/drivers/gpio/gpio-em.c
+++ work/drivers/gpio/gpio-em.c 2013-11-13 20:47:40.000000000 +0900
@@ -327,6 +327,7 @@ static int em_gio_probe(struct platform_
gpio_chip->request = em_gio_request;
gpio_chip->free = em_gio_free;
gpio_chip->label = name;
+ gpio_chip->dev = &pdev->dev;
gpio_chip->owner = THIS_MODULE;
gpio_chip->base = pdata->gpio_base;
gpio_chip->ngpio = pdata->number_of_pins;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 04/05 v2] gpio: em: Use lazy disable
2013-11-20 0:22 [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Magnus Damm
` (2 preceding siblings ...)
2013-11-20 0:23 ` [PATCH 03/05] gpio: em: Setup gpiochip->dev Magnus Damm
@ 2013-11-20 0:23 ` Magnus Damm
2013-11-20 13:39 ` Linus Walleij
2013-11-20 0:23 ` [PATCH 05/05 v2] gpio: em: Enable mask on suspend Magnus Damm
2013-11-20 10:58 ` [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Laurent Pinchart
5 siblings, 1 reply; 12+ messages in thread
From: Magnus Damm @ 2013-11-20 0:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-sh, linus.walleij, grant.likely, horms, laurent.pinchart,
Magnus Damm
From: Magnus Damm <damm@opensource.se>
Set the ->irq_enable() and ->irq_disable() methods to NULL
to enable lazy disable of interrupts. This by itself provides
some level of optimization, but is mainly enabled as ground
work for future Suspend-to-RAM wake up support.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/gpio/gpio-em.c | 2 --
1 file changed, 2 deletions(-)
--- 0010/drivers/gpio/gpio-em.c
+++ work/drivers/gpio/gpio-em.c 2013-11-20 08:32:49.000000000 +0900
@@ -336,8 +336,6 @@ static int em_gio_probe(struct platform_
irq_chip->name = name;
irq_chip->irq_mask = em_gio_irq_disable;
irq_chip->irq_unmask = em_gio_irq_enable;
- irq_chip->irq_enable = em_gio_irq_enable;
- irq_chip->irq_disable = em_gio_irq_disable;
irq_chip->irq_set_type = em_gio_irq_set_type;
irq_chip->flags = IRQCHIP_SKIP_SET_WAKE;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 05/05 v2] gpio: em: Enable mask on suspend
2013-11-20 0:22 [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Magnus Damm
` (3 preceding siblings ...)
2013-11-20 0:23 ` [PATCH 04/05 v2] gpio: em: Use lazy disable Magnus Damm
@ 2013-11-20 0:23 ` Magnus Damm
2013-11-20 13:41 ` Linus Walleij
2013-11-20 10:58 ` [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Laurent Pinchart
5 siblings, 1 reply; 12+ messages in thread
From: Magnus Damm @ 2013-11-20 0:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-sh, linus.walleij, grant.likely, horms, laurent.pinchart,
Magnus Damm
From: Magnus Damm <damm@opensource.se>
Now when lazy interrupt disable has been enabled in the driver
then extend the code to set IRQCHIP_MASK_ON_SUSPEND which tells
the core that only IRQs marked as wakeups need to stay enabled
during Suspend-to-RAM.
Tested on the KZM9D board with GPIO-keys.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/gpio/gpio-em.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 0011/drivers/gpio/gpio-em.c
+++ work/drivers/gpio/gpio-em.c 2013-11-20 08:33:47.000000000 +0900
@@ -337,7 +337,7 @@ static int em_gio_probe(struct platform_
irq_chip->irq_mask = em_gio_irq_disable;
irq_chip->irq_unmask = em_gio_irq_enable;
irq_chip->irq_set_type = em_gio_irq_set_type;
- irq_chip->flags = IRQCHIP_SKIP_SET_WAKE;
+ irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
pdata->number_of_pins,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 00/05] gpio: R-Car and EM GPIO update V2
2013-11-20 0:22 [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Magnus Damm
` (4 preceding siblings ...)
2013-11-20 0:23 ` [PATCH 05/05 v2] gpio: em: Enable mask on suspend Magnus Damm
@ 2013-11-20 10:58 ` Laurent Pinchart
5 siblings, 0 replies; 12+ messages in thread
From: Laurent Pinchart @ 2013-11-20 10:58 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-kernel, linux-sh, linus.walleij, grant.likely, horms
Hi Magnus,
Thank you for the patch.
On Wednesday 20 November 2013 09:22:59 Magnus Damm wrote:
> gpio: R-Car and EM GPIO update V2
>
> [PATCH 01/05 v2] gpio: rcar: Use lazy disable
> [PATCH 02/05 v2] gpio: rcar: Enable mask on suspend
> [PATCH 03/05] gpio: em: Setup gpiochip->dev
> [PATCH 04/05 v2] gpio: em: Use lazy disable
> [PATCH 05/05 v2] gpio: em: Enable mask on suspend
>
> Update the R-Car GPIO driver and the GPIO driver used on EMEV2 to use lazy
> disable and mask on suspend. This fixes the Suspend-to-RAM behavior to make
> sure wakeup sources are left enabled while suspending. Also include a small
> fix for gpio-em that fixes the DT use case.
>
> Thanks to Laurent and Linus for feedback.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
For the whole series,
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>
> Written against renesas.git tag renesas-devel-v3.12-20131119
>
> Changes since V1:
> - Split lazy disable and mask on suspend patches
> - Improved commit messages
>
> drivers/gpio/gpio-em.c | 5 ++---
> drivers/gpio/gpio-rcar.c | 5 ++---
> 2 files changed, 4 insertions(+), 6 deletions(-)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 01/05 v2] gpio: rcar: Use lazy disable
2013-11-20 0:23 ` [PATCH 01/05 v2] gpio: rcar: Use lazy disable Magnus Damm
@ 2013-11-20 13:34 ` Linus Walleij
0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2013-11-20 13:34 UTC (permalink / raw)
To: Magnus Damm
Cc: linux-kernel, linux-sh, Grant Likely, Simon Horman, Laurent Pinchart
On Wed, Nov 20, 2013 at 1:23 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Set the ->irq_enable() and ->irq_disable() methods to NULL
> to enable lazy disable of interrupts. This by itself provides
> some level of optimization, but is mainly enabled as ground
> work for future Suspend-to-RAM wake up support.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
Patch applied w/Laurent's ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 02/05 v2] gpio: rcar: Enable mask on suspend
2013-11-20 0:23 ` [PATCH 02/05 v2] gpio: rcar: Enable mask on suspend Magnus Damm
@ 2013-11-20 13:37 ` Linus Walleij
0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2013-11-20 13:37 UTC (permalink / raw)
To: Magnus Damm
Cc: linux-kernel, linux-sh, Grant Likely, Simon Horman, Laurent Pinchart
On Wed, Nov 20, 2013 at 1:23 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Now when lazy interrupt disable has been enabled in the driver
> then extend the code to set IRQCHIP_MASK_ON_SUSPEND which tells
> the core that only IRQs marked as wakeups need to stay enabled
> during Suspend-to-RAM.
>
> Tested on the Lager board with GPIO-keys and Suspend-to-RAM.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 03/05] gpio: em: Setup gpiochip->dev
2013-11-20 0:23 ` [PATCH 03/05] gpio: em: Setup gpiochip->dev Magnus Damm
@ 2013-11-20 13:38 ` Linus Walleij
0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2013-11-20 13:38 UTC (permalink / raw)
To: Magnus Damm
Cc: linux-kernel, linux-sh, Grant Likely, Simon Horman, Laurent Pinchart
On Wed, Nov 20, 2013 at 1:23 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Make sure gpio_chip->dev is setup so of_gpiochip_add()
> will work as expected.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 04/05 v2] gpio: em: Use lazy disable
2013-11-20 0:23 ` [PATCH 04/05 v2] gpio: em: Use lazy disable Magnus Damm
@ 2013-11-20 13:39 ` Linus Walleij
0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2013-11-20 13:39 UTC (permalink / raw)
To: Magnus Damm
Cc: linux-kernel, linux-sh, Grant Likely, Simon Horman, Laurent Pinchart
On Wed, Nov 20, 2013 at 1:23 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Set the ->irq_enable() and ->irq_disable() methods to NULL
> to enable lazy disable of interrupts. This by itself provides
> some level of optimization, but is mainly enabled as ground
> work for future Suspend-to-RAM wake up support.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 05/05 v2] gpio: em: Enable mask on suspend
2013-11-20 0:23 ` [PATCH 05/05 v2] gpio: em: Enable mask on suspend Magnus Damm
@ 2013-11-20 13:41 ` Linus Walleij
0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2013-11-20 13:41 UTC (permalink / raw)
To: Magnus Damm
Cc: linux-kernel, linux-sh, Grant Likely, Simon Horman, Laurent Pinchart
On Wed, Nov 20, 2013 at 1:23 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Now when lazy interrupt disable has been enabled in the driver
> then extend the code to set IRQCHIP_MASK_ON_SUSPEND which tells
> the core that only IRQs marked as wakeups need to stay enabled
> during Suspend-to-RAM.
>
> Tested on the KZM9D board with GPIO-keys.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-11-20 13:41 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-20 0:22 [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Magnus Damm
2013-11-20 0:23 ` [PATCH 01/05 v2] gpio: rcar: Use lazy disable Magnus Damm
2013-11-20 13:34 ` Linus Walleij
2013-11-20 0:23 ` [PATCH 02/05 v2] gpio: rcar: Enable mask on suspend Magnus Damm
2013-11-20 13:37 ` Linus Walleij
2013-11-20 0:23 ` [PATCH 03/05] gpio: em: Setup gpiochip->dev Magnus Damm
2013-11-20 13:38 ` Linus Walleij
2013-11-20 0:23 ` [PATCH 04/05 v2] gpio: em: Use lazy disable Magnus Damm
2013-11-20 13:39 ` Linus Walleij
2013-11-20 0:23 ` [PATCH 05/05 v2] gpio: em: Enable mask on suspend Magnus Damm
2013-11-20 13:41 ` Linus Walleij
2013-11-20 10:58 ` [PATCH 00/05] gpio: R-Car and EM GPIO update V2 Laurent Pinchart
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).