Mainline commit
2c60e6b5c924 ("gpiolib: never report open-drain/source
lines as 'input' to user-space") in the linux kernel has now been
backported to v5.2 stable branch and released in linux v5.2.11. We can
now enable back the assertions that were previously failed in test
suites (core, C++ and python). The required kernel versions must be
updated as well.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
kernel_checker& operator=(kernel_checker&& other) = delete;
};
-kernel_checker require_kernel(5, 2, 7);
+kernel_checker require_kernel(5, 2, 11);
} /* namespace */
REQUIRE(line.offset() == 4);
REQUIRE(line.name() == "gpio-mockup-A-4");
- /* FIXME Uncomment the line below once this issue is fixed in the kernel. */
- //REQUIRE(line.direction() == ::gpiod::line::DIRECTION_OUTPUT);
+ REQUIRE(line.direction() == ::gpiod::line::DIRECTION_OUTPUT);
REQUIRE(line.active_state() == ::gpiod::line::ACTIVE_LOW);
REQUIRE(line.is_requested());
REQUIRE(line.is_used());
flags=flags)
self.assertEqual(line.offset(), 4)
self.assertEqual(line.name(), 'gpio-mockup-A-4')
- # FIXME Uncomment the line below once this issue is fixed in the kernel.
- #self.assertEqual(line.direction(), gpiod.Line.DIRECTION_OUTPUT)
+ self.assertEqual(line.direction(), gpiod.Line.DIRECTION_OUTPUT)
self.assertEqual(line.active_state(), gpiod.Line.ACTIVE_LOW)
self.assertEqual(line.consumer(), default_consumer)
self.assertTrue(line.is_used())
#
if __name__ == '__main__':
- check_kernel(5, 2, 7)
+ check_kernel(5, 2, 11)
mockup = gpiomockup.Mockup()
unittest.main()
#define MIN_KERNEL_MAJOR 5
#define MIN_KERNEL_MINOR 2
-#define MIN_KERNEL_RELEASE 7
+#define MIN_KERNEL_RELEASE 11
#define MIN_KERNEL_VERSION KERNEL_VERSION(MIN_KERNEL_MAJOR, \
MIN_KERNEL_MINOR, \
MIN_KERNEL_RELEASE)
g_assert_true(gpiod_line_is_used(line));
g_assert_false(gpiod_line_is_open_drain(line));
g_assert_true(gpiod_line_is_open_source(line));
- /*
- * FIXME Enable the line below once the open-source/drain issue is
- * fixed in the kernel.
- */
-/*
g_assert_cmpint(gpiod_line_direction(line), ==,
GPIOD_LINE_DIRECTION_OUTPUT);
-*/
}
GPIOD_TEST_CASE(misc_flags_work_together, 0, { 8 })
g_assert_false(gpiod_line_is_open_source(line));
g_assert_cmpint(gpiod_line_active_state(line), ==,
GPIOD_LINE_ACTIVE_STATE_LOW);
- /*
- * FIXME Enable the line below once the open-source/drain issue is
- * fixed in the kernel.
- */
-/*
g_assert_cmpint(gpiod_line_direction(line), ==,
GPIOD_LINE_DIRECTION_OUTPUT);
-*/
gpiod_line_release(line);