summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorDoug Berger <opendmb@gmail.com>2017-10-24 21:54:49 +0200
committerLinus Walleij <linus.walleij@linaro.org>2017-10-31 10:30:44 +0100
commit633007a36e51c5dd85a20e9ebd17de12566cf2c2 (patch)
treecc3722873fca60b0cb952b53238b27addc254a4b /drivers/gpio
parentgpio: brcmstb: switch to handle_level_irq flow (diff)
downloadlinux-633007a36e51c5dd85a20e9ebd17de12566cf2c2.tar.xz
linux-633007a36e51c5dd85a20e9ebd17de12566cf2c2.zip
gpio: brcmstb: correct the configuration of level interrupts
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> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Gregory Fong <gregory.0xf0@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-brcmstb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c
index 513de4936a25..183863902f7f 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: