summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibo Chen <libo.chen.cn@windriver.com>2025-03-12 19:34:39 +0800
committerArmin Kuster <akuster808@gmail.com>2025-03-23 15:27:19 -0400
commit6f488ab715710de4e49febd51a5776467cc74877 (patch)
treeb2b47a8288462140a71fad22827b449b880b06af
parent3e3de7632e570cd517be055bee3e639d5b61c26a (diff)
downloadmeta-openembedded-6f488ab715710de4e49febd51a5776467cc74877.tar.gz
libgpiod: fix gpiod-cxx-test failed test case
Patch from: https://web.git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/?id=3e224d885b1de54fe5510b9c5e7296260a1a4507 Signed-off-by: Libo Chen <libo.chen.cn@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch38
-rw-r--r--meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb2
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch b/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch
new file mode 100644
index 0000000000..f8b94f0b99
--- /dev/null
+++ b/meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch
@@ -0,0 +1,38 @@
1From 8c7126b7b5dee0ed5433cf9265ccc79095d53939 Mon Sep 17 00:00:00 2001
2From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
3Date: Mon, 8 Jul 2024 11:48:27 +0200
4Subject: [PATCH] bindings: cxx: tests: set direction when reconfiguring lines
5
6Linux kernel commit b44039638741 ("gpiolib: cdev: Ignore reconfiguration
7without direction") made the direction setting mandatory for line config
8passed to the kernel when reconfiguring requested lines. Fix the C++ test
9case which doesn't do it and now fails due to the rest of the settings
10being ignored.
11
12Reviewed-by: Kent Gibson <warthog618@gmail.com>
13Link: https://lore.kernel.org/r/20240708094827.84986-1-brgl@bgdev.pl
14Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
15
16Upstream-Status: Backport
17[https://web.git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/?id=3e224d885b1de54fe5510b9c5e7296260a1a4507]
18
19Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
20---
21 bindings/cxx/tests/tests-line-request.cpp | 1 +
22 1 file changed, 1 insertion(+)
23
24diff --git a/bindings/cxx/tests/tests-line-request.cpp b/bindings/cxx/tests/tests-line-request.cpp
25index 9632ae0..6e29532 100644
26--- a/bindings/cxx/tests/tests-line-request.cpp
27+++ b/bindings/cxx/tests/tests-line-request.cpp
28@@ -208,6 +208,7 @@ TEST_CASE("values can be read", "[line-request]")
29 .add_line_settings(
30 offs,
31 ::gpiod::line_settings()
32+ .set_direction(direction::INPUT)
33 .set_active_low(true))
34 );
35
36--
372.44.1
38
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb
index 6e4fbd2a3b..edbde0f7a7 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb
@@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = " \
7 file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \ 7 file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \
8" 8"
9 9
10SRC_URI += "file://0001-bindings-cxx-tests-set-direction-when-reconfiguring-.patch"
11
10FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:" 12FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
11 13
12SRC_URI[sha256sum] = "7a148a5a7d1c97a1abb40474b9a392b6edd7a42fe077dfd7ff42cfba24308548" 14SRC_URI[sha256sum] = "7a148a5a7d1c97a1abb40474b9a392b6edd7a42fe077dfd7ff42cfba24308548"