public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
* [libgpiod][PATCH] bindings: cxx: tests: set direction when reconfiguring lines
@ 2024-07-08  9:48 Bartosz Golaszewski
  2024-07-08 10:00 ` Kent Gibson
  2024-07-08 18:53 ` Bartosz Golaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-07-08  9:48 UTC (permalink / raw)
  To: Kent Gibson, Linus Walleij; +Cc: linux-gpio, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Linux kernel commit b44039638741 ("gpiolib: cdev: Ignore reconfiguration
without direction") made the direction setting mandatory for line config
passed to the kernel when reconfiguring requested lines. Fix the C++ test
case which doesn't do it and now fails due to the rest of the settings
being ignored.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 bindings/cxx/tests/tests-line-request.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bindings/cxx/tests/tests-line-request.cpp b/bindings/cxx/tests/tests-line-request.cpp
index af8b979..a99bd44 100644
--- a/bindings/cxx/tests/tests-line-request.cpp
+++ b/bindings/cxx/tests/tests-line-request.cpp
@@ -208,6 +208,7 @@ TEST_CASE("values can be read", "[line-request]")
 				.add_line_settings(
 					offs,
 					::gpiod::line_settings()
+						.set_direction(direction::INPUT)
 						.set_active_low(true))
 		);
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [libgpiod][PATCH] bindings: cxx: tests: set direction when reconfiguring lines
  2024-07-08  9:48 [libgpiod][PATCH] bindings: cxx: tests: set direction when reconfiguring lines Bartosz Golaszewski
@ 2024-07-08 10:00 ` Kent Gibson
  2024-07-08 18:53 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Kent Gibson @ 2024-07-08 10:00 UTC (permalink / raw)
  To: Bartosz Golaszewski; +Cc: Linus Walleij, linux-gpio, Bartosz Golaszewski

On Mon, Jul 08, 2024 at 11:48:27AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Linux kernel commit b44039638741 ("gpiolib: cdev: Ignore reconfiguration
> without direction") made the direction setting mandatory for line config
> passed to the kernel when reconfiguring requested lines. Fix the C++ test
> case which doesn't do it and now fails due to the rest of the settings
> being ignored.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>  bindings/cxx/tests/tests-line-request.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/bindings/cxx/tests/tests-line-request.cpp b/bindings/cxx/tests/tests-line-request.cpp
> index af8b979..a99bd44 100644
> --- a/bindings/cxx/tests/tests-line-request.cpp
> +++ b/bindings/cxx/tests/tests-line-request.cpp
> @@ -208,6 +208,7 @@ TEST_CASE("values can be read", "[line-request]")
>  				.add_line_settings(
>  					offs,
>  					::gpiod::line_settings()
> +						.set_direction(direction::INPUT)
>  						.set_active_low(true))
>  		);
>

My bad - I hadn't tried the C++ or Rust tests with that patch, or I
would've patched these myself.

Reviewed-by: Kent Gibson <warthog618@gmail.com>

for both C++ and Rust.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [libgpiod][PATCH] bindings: cxx: tests: set direction when reconfiguring lines
  2024-07-08  9:48 [libgpiod][PATCH] bindings: cxx: tests: set direction when reconfiguring lines Bartosz Golaszewski
  2024-07-08 10:00 ` Kent Gibson
@ 2024-07-08 18:53 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-07-08 18:53 UTC (permalink / raw)
  To: Kent Gibson, Linus Walleij, Bartosz Golaszewski
  Cc: Bartosz Golaszewski, linux-gpio

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Mon, 08 Jul 2024 11:48:27 +0200, Bartosz Golaszewski wrote:
> Linux kernel commit b44039638741 ("gpiolib: cdev: Ignore reconfiguration
> without direction") made the direction setting mandatory for line config
> passed to the kernel when reconfiguring requested lines. Fix the C++ test
> case which doesn't do it and now fails due to the rest of the settings
> being ignored.
> 
> 
> [...]

Applied, thanks!

[1/1] bindings: cxx: tests: set direction when reconfiguring lines
      commit: 3e224d885b1de54fe5510b9c5e7296260a1a4507

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-08 18:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-08  9:48 [libgpiod][PATCH] bindings: cxx: tests: set direction when reconfiguring lines Bartosz Golaszewski
2024-07-08 10:00 ` Kent Gibson
2024-07-08 18:53 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox