aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-07-28 23:04:19 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-07-28 23:04:19 +0200
commit238644ce4b50a16f1c028d2b92ab2947f61d322e (patch)
tree09839bccb2f0faef62b3c9b0fef466994da0e659 /drivers
parentLinus 5.3-rc1 (diff)
parentgpio: don't WARN() on NULL descs if gpiolib is disabled (diff)
downloadlinux-dev-238644ce4b50a16f1c028d2b92ab2947f61d322e.tar.xz
linux-dev-238644ce4b50a16f1c028d2b92ab2947f61d322e.zip
Merge tag 'gpio-v5.3-rc3-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes
gpio fixes for v5.3-rc3 - fix for user space handling of active-low flag for GPIO events - fix the stubs for gpiolib: don't WARN() on NULL gpio descriptors if gpiolib is not compiled
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/gpiolib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 3ee99d070608..bf05c29b53be 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -956,9 +956,11 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)
}
if (eflags & GPIOEVENT_REQUEST_RISING_EDGE)
- irqflags |= IRQF_TRIGGER_RISING;
+ irqflags |= test_bit(FLAG_ACTIVE_LOW, &desc->flags) ?
+ IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING;
if (eflags & GPIOEVENT_REQUEST_FALLING_EDGE)
- irqflags |= IRQF_TRIGGER_FALLING;
+ irqflags |= test_bit(FLAG_ACTIVE_LOW, &desc->flags) ?
+ IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING;
irqflags |= IRQF_ONESHOT;
INIT_KFIFO(le->events);