Skip to content

bindings: python: improve line requests and reconfiguration

Vincent Fazio linux-gpio 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9bindings: python: make config iteration consistentbindings/python/gpiod/_internal.py bindings/python/gpiod/chip.py bindings/python/gpiod/line_request.py+41 -310 replies
2/9bindings: python: remove unused attribute from LineRequestbindings/python/gpiod/chip.py bindings/python/gpiod/line_request.py+0 -20 replies
3/9bindings: python: chip: track requested lines when enumeratingbindings/python/gpiod/chip.py+3 -50 replies
4/9bindings: python: chip: simplify duplicate checkingbindings/python/gpiod/chip.py+7 -240 replies
5/9bindings: python: chip: check mapped_output_values membership oncebindings/python/gpiod/chip.py+2 -50 replies
6/9bindings: python: line_request: ignore invalid line names in reconfigure_linesbindings/python/gpiod/line_request.py bindings/python/tests/tests_line_request.py+24 -80 replies
7/9bindings: python: ext: add ability to query line namebindings/python/gpiod/_ext.pyi bindings/python/gpiod/ext/chip.c+32 -00 replies
8/9bindings: python: chip: map names for lines requested by offsetbindings/python/gpiod/chip.py bindings/python/tests/tests_line_request.py+40 -40 replies
9/9bindings: python: line_request: warn on unknown lines when reconfiguringbindings/python/gpiod/line_request.py bindings/python/tests/tests_line_request.py+31 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [libgpiod][PATCH 0/9] bindings: python: improve line requests and reconfiguration

This series makes a number of minor improvements to consistency, speed, and code clarity for line requests and reconfiguration.

Patch 1 makes iterating through a configuration object consistent across line requests and reconfiguration and helps condense code, making it a bit more readable.

Patch 2 removes an unused attribute from LineRequest.

Patches 3-5 are minor cleanups to simplify and speed up line requests.

Patch 6 makes the behavior of reconfiguring an unrequested line name consistent with that of an unrequested offset.

Patches 7-8 make lines requested by offset reconfigurable via line name making them consistent with lines requested by name being reconfigurable via offset.

Patch 9 updates line reconfiguration to warn the caller if a line was included that was not part of the original line request.

Vincent Fazio (9):
bindings: python: make config iteration consistent
bindings: python: remove unused attribute from LineRequest
bindings: python: chip: track requested lines when enumerating
bindings: python: chip: simplify duplicate checking
bindings: python: chip: check mapped_output_values membership once
bindings: python: line_request: ignore invalid line names in
reconfigure_lines
bindings: python: ext: add ability to query line name
bindings: python: chip: map names for lines requested by offset
bindings: python: line_request: warn on unknown lines when
reconfiguring

 bindings/python/gpiod/_ext.pyi              |  1 +
 bindings/python/gpiod/_internal.py          | 22 +++++-
 bindings/python/gpiod/chip.py               | 84 ++++++++-------------
 bindings/python/gpiod/ext/chip.c            | 31 ++++++++
 bindings/python/gpiod/line_request.py       | 36 +++++----
 bindings/python/tests/tests_line_request.py | 63 ++++++++++++++--
 6 files changed, 163 insertions(+), 74 deletions(-)
Signature · 1 line
2.43.0