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


Groups > linux.kernel > #1742486

[PATCH 4/7] gpio: brcmstb: correct the configuration of level interrupts

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

Show all headers | View raw


This commit corrects a bug when configuring the GPIO hardware for
IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_LEVEL_HIGH interrupt types. The
hardware is now correctly configured to support those types.

Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support")
Signed-off-by: Doug Berger <opendmb@gmail.com>
---
 drivers/gpio/gpio-brcmstb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c
index c186141927bb..0418cb266586 100644
--- a/drivers/gpio/gpio-brcmstb.c
+++ b/drivers/gpio/gpio-brcmstb.c
@@ -137,13 +137,13 @@ static int brcmstb_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 
 	switch (type) {
 	case IRQ_TYPE_LEVEL_LOW:
-		level = 0;
+		level = mask;
 		edge_config = 0;
 		edge_insensitive = 0;
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
 		level = mask;
-		edge_config = 0;
+		edge_config = mask;
 		edge_insensitive = 0;
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-- 
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