Kernel commit
223ecaf140b1 ("gpiolib: fix incorrect IRQ requesting of
an active-low lineevent") fixed an issue with line events not being
inverted with the GPIOHANDLE_REQUEST_ACTIVE_LOW flag. This change has
now been released in linux v5.2.7 and the relevant test case for
gpiomon needs to be adjusted.
Since the line going down will now be interpreted as a rising edge
event, set the pull to 1 before running gpiomon and then set it to 0
after starting it to trigger a rising edge event.
The minimum kernel version to run tests must be set to v5.2.7.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
# Copyright (C) 2019 Bartosz Golaszewski <bgolaszewski@baylibre.com>
#
-MIN_KERNEL_VERSION="5.1.0"
+MIN_KERNEL_VERSION="5.2.7"
BATS_SCRIPT="gpio-tools-test.bats"
SOURCE_DIR="$(dirname ${BASH_SOURCE[0]})"
@test "gpiomon: single rising edge event (active-low)" {
gpio_mockup_probe 8 8
+ gpio_mockup_set_pull 1 4 1
+
coproc_run_tool gpiomon --rising-edge --active-low "$(gpio_mockup_chip_name 1)" 4
- gpio_mockup_set_pull 1 4 1
+ gpio_mockup_set_pull 1 4 0
sleep 0.2
coproc_tool_kill