diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-07-28 23:04:19 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-07-28 23:04:19 +0200 |
commit | 238644ce4b50a16f1c028d2b92ab2947f61d322e (patch) | |
tree | 09839bccb2f0faef62b3c9b0fef466994da0e659 /drivers | |
parent | Linus 5.3-rc1 (diff) | |
parent | gpio: don't WARN() on NULL descs if gpiolib is disabled (diff) | |
download | linux-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.c | 6 |
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); |