Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742487

[PATCH 5/7] gpio: brcmstb: enable masking of interrupts when changing type

From Doug Berger <opendmb@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 5/7] gpio: brcmstb: enable masking of interrupts when changing type
Date 2017-09-30 05:50 +0200
Message-ID <uvgWS-78I-13@gated-at.bofh.it> (permalink)
References <uvgWR-78I-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Mask the GPIO interrupt while its type is being changed, just in case
it can prevent a spurious interrupt.

Signed-off-by: Doug Berger <opendmb@gmail.com>
---
 drivers/gpio/gpio-brcmstb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c
index 0418cb266586..e2fff559c1ca 100644
--- a/drivers/gpio/gpio-brcmstb.c
+++ b/drivers/gpio/gpio-brcmstb.c
@@ -363,7 +363,9 @@ static int brcmstb_gpio_irq_setup(struct platform_device *pdev,
 	bank->irq_chip.irq_set_type = brcmstb_gpio_irq_set_type;
 
 	/* Ensures that all non-wakeup IRQs are disabled at suspend */
-	bank->irq_chip.flags = IRQCHIP_MASK_ON_SUSPEND;
+	/* and that interrupts are masked when changing their type  */
+	bank->irq_chip.flags = IRQCHIP_MASK_ON_SUSPEND |
+			       IRQCHIP_SET_TYPE_MASKED;
 
 	if (IS_ENABLED(CONFIG_PM_SLEEP) && !priv->parent_wake_irq &&
 			of_property_read_bool(np, "wakeup-source")) {
-- 
2.14.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] gpio: brcmstb: improved interrupt and wake support Doug Berger <opendmb@gmail.com> - 2017-09-30 05:50 +0200
  [PATCH 4/7] gpio: brcmstb: correct the configuration of level interrupts Doug Berger <opendmb@gmail.com> - 2017-09-30 05:50 +0200
  [PATCH 5/7] gpio: brcmstb: enable masking of interrupts when changing type Doug Berger <opendmb@gmail.com> - 2017-09-30 05:50 +0200
  [PATCH 1/7] gpio: brcmstb: allow all instances to be wakeup sources Doug Berger <opendmb@gmail.com> - 2017-09-30 05:50 +0200
  [PATCH 3/7] gpio: brcmstb: switch to handle_level_irq flow Doug Berger <opendmb@gmail.com> - 2017-09-30 05:50 +0200
  [PATCH 2/7] gpio: brcmstb: release the bgpio lock during irq handlers Doug Berger <opendmb@gmail.com> - 2017-09-30 05:50 +0200
  Re: [PATCH 0/7] gpio: brcmstb: improved interrupt and wake support Florian Fainelli <f.fainelli@gmail.com> - 2017-09-30 07:40 +0200

csiph-web