From: Eduardo Valentin <edubezval@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>
Cc: ubrindis56@gmail.com, Fabio Estevam <fabio.estevam@freescale.com>,
festevam@gmail.com, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Eduardo Valentin <edubezval@gmail.com>
Subject: [PATCH 1/2] gpio/mxc: mask gpio interrupts in suspend
Date: Wed, 5 Aug 2015 10:23:07 -0700 [thread overview]
Message-ID: <1438795388-22743-2-git-send-email-edubezval@gmail.com> (raw)
In-Reply-To: <1438795388-22743-1-git-send-email-edubezval@gmail.com>
From: Ulises Brindis <ubrindis56@gmail.com>
Currently in the FSL platform all GPIO interrupts in a bank are muxed
into two GPIO lines to the GPC interrupt controller. In each GPIO bank
GPIOs 0-15 are OR'ed into one GPC interrupt controller interrupt and 16-31
are OR'ed into another. With the current code, if any of the 0-15 or
16-31 interrupts are marked as wakeup capable, all interrupts belonging
to that sub-bank (either 0-15 or 16-31) will wake up the device. This is
because interrupts are only being masked at the interrupt controller
and not at the GPIO controller.
This patch allows masking of GPIO interrupts at the GPIO controller during
suspend if they have not been labeled wakeup capable. This patch uses
preexisting IRQCHIP_MASK_ON_SUSPEND flag while initializing the GPIO
interrupts to get the desired behavior.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Ulises Brindis <ubrindis56@gmail.com>
---
drivers/gpio/gpio-mxc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index ec1eb1b..9e5bdbd 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -354,6 +354,7 @@ static void __init mxc_gpio_init_gc(struct mxc_gpio_port *port, int irq_base)
ct->chip.irq_unmask = irq_gc_mask_set_bit;
ct->chip.irq_set_type = gpio_set_irq_type;
ct->chip.irq_set_wake = gpio_set_wake_irq;
+ ct->chip.flags = IRQCHIP_MASK_ON_SUSPEND;
ct->regs.ack = GPIO_ISR;
ct->regs.mask = GPIO_IMR;
--
2.5.0
next prev parent reply other threads:[~2015-08-05 17:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 17:23 [PATCH 0/2] couple of fixes on IMX gpio driver Eduardo Valentin
2015-08-05 17:23 ` Eduardo Valentin [this message]
2015-08-13 12:47 ` [PATCH 1/2] gpio/mxc: mask gpio interrupts in suspend Linus Walleij
2015-08-05 17:23 ` [PATCH 2/2] gpio/mxc: implement reading output gpio value Eduardo Valentin
2015-08-05 17:43 ` Fabio Estevam
2015-08-05 18:02 ` Eduardo Valentin
2015-08-05 18:11 ` Fabio Estevam
2015-08-05 19:46 ` Eduardo Valentin
2015-08-05 20:44 ` Fabio Estevam
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=1438795388-22743-2-git-send-email-edubezval@gmail.com \
--to=edubezval@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ubrindis56@gmail.com \
/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).