linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libgpiod][PATCH 0/3] bindings: python: more flexible reconfigure_lines()
@ 2024-06-26  5:38 Kent Gibson
  2024-06-26  5:38 ` [libgpiod][PATCH 1/3] bindings: python: tests: extend reconfiguration tests Kent Gibson
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Kent Gibson @ 2024-06-26  5:38 UTC (permalink / raw)
  To: linux-gpio, brgl; +Cc: Kent Gibson

This series addresses issue #54[1], making reconfigure_lines() less
restrictive in the configurations it will accept, allowing for
misordered configurations and reconfiguring a subset of lines.

Patch 1 adds a set of tests for the new behaviour.  These all fail with
the existing bindings, but pass after patch 2 is applied.

Patch 2 is the change to reconfigure_lines() itself.

The reconfiguration of a subset of lines works better with a change to the
kernel to ignore reconfiguration of lines without a direction set,
i.e. a default LineSettings.
With existing kernels, if a line has been requested with flags set to
non-default values those flags will be reset to default values, though
that may not become evident electrically until subsequent operations are
performed on the line.

Patch 3 extends the tests to demonstrate that kernel issue.  A kernel
patch addressing that issue has been submitted[2], and the test passes
with that patch applied.

Cheers,
Kent.

[1] https://github.com/brgl/libgpiod/issues/54
[2] https://lore.kernel.org/linux-gpio/20240626052925.174272-3-warthog618@gmail.com

Kent Gibson (3):
  bindings: python: tests: extend reconfiguration tests
  bindings: python: more flexible reconfigure_lines()
  bindings: python: tests: add coverage of kernel reconfigure as-is
    behaviour

 bindings/python/gpiod/line_request.py       | 17 +++---
 bindings/python/tests/tests_line_request.py | 64 ++++++++++++++++++++-
 2 files changed, 72 insertions(+), 9 deletions(-)

--
2.39.2


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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-26  5:38 [libgpiod][PATCH 0/3] bindings: python: more flexible reconfigure_lines() Kent Gibson
2024-06-26  5:38 ` [libgpiod][PATCH 1/3] bindings: python: tests: extend reconfiguration tests Kent Gibson
2024-06-26  5:38 ` [libgpiod][PATCH 2/3] bindings: python: more flexible reconfigure_lines() Kent Gibson
2024-06-26  5:38 ` [libgpiod][PATCH 3/3] bindings: python: tests: add coverage of kernel reconfigure as-is behaviour Kent Gibson
2024-06-27 15:06   ` Bartosz Golaszewski
2024-06-27 15:20     ` Bartosz Golaszewski
2024-06-28  1:26       ` Kent Gibson
2024-07-05  7:34 ` [libgpiod][PATCH 0/3] bindings: python: more flexible reconfigure_lines() Bartosz Golaszewski
2024-07-06  2:35   ` Kent Gibson
2024-07-08  9:54 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).