Skip to content

core: provide information about the parent chip in line requests

Bartosz Golaszewski linux-gpio 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 7 repliesIn review
  2. v15 patches 17 repliesSuperseded

Changes in v2 from the cover letter

- provide the chip name, not its filesystem path
- fix UNSAFE comments in rust bindings

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5core: provide gpiod_line_request_get_chip_name()include/gpiod.h lib/chip.c lib/internal.h +1 more+36 -30 replies
2/5tests: add a test-case for gpiod_line_request_get_chip_name()tests/tests-line-request.c+21 -00 replies
3/5bindings: cxx: provide line_request::chip_name()bindings/cxx/gpiodcxx/line-request.hpp bindings/cxx/line-request.cpp bindings/cxx/tests/tests-line-request.cpp+19 -30 replies
4/5bindings: python: provide the chip_name property in line_requestbindings/python/gpiod/chip.py bindings/python/gpiod/ext/request.c bindings/python/gpiod/line_request.py +1 more+30 -70 replies
5/5bindings: rust: provide LineRequest::chip_name()bindings/rust/libgpiod/src/line_request.rs bindings/rust/libgpiod/tests/line_request.rs+30 -07 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchErik SchillingKent GibsonViresh Kumar
1/5
2/5
3/5
4/5
5/5R-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [libgpiod][PATCH v2 0/5] core: provide information about the parent chip in line requests

From: Bartosz Golaszewski <[email protected]>

While working on the DBus API, it occurred to me that while we can obtain the list of requested offsets from a line request, this information lacks context if we cannot get any information about the parent chip on which the request was made.

We cannot reference the chip in any way as its lifetime is disconnected from the request but we can at least provide the name of the chip used to create the request providing some context for the offsets.

This series adds a new getter for struct gpiod_line_request and wrappers for it for all bindings. This will be used in the upcoming DBus GPIO manager code.

v1 -> v2:
- provide the chip name, not its filesystem path
- fix UNSAFE comments in rust bindings

Bartosz Golaszewski (5):
core: provide gpiod_line_request_get_chip_name()
tests: add a test-case for gpiod_line_request_get_chip_name()
bindings: cxx: provide line_request::chip_name()
bindings: python: provide the chip_name property in line_request
bindings: rust: provide LineRequest::chip_name()

 bindings/cxx/gpiodcxx/line-request.hpp       |  6 ++++++
 bindings/cxx/line-request.cpp                | 10 +++++++++-
 bindings/cxx/tests/tests-line-request.cpp    |  6 ++++--
 bindings/python/gpiod/chip.py                |  1 +
 bindings/python/gpiod/ext/request.c          | 11 ++++++++++
 bindings/python/gpiod/line_request.py        | 12 +++++++++--
 bindings/python/tests/tests_line_request.py  | 13 +++++++-----
 bindings/rust/libgpiod/src/line_request.rs   | 16 +++++++++++++++
 bindings/rust/libgpiod/tests/line_request.rs | 14 +++++++++++++
 include/gpiod.h                              |  9 +++++++++
 lib/chip.c                                   |  7 ++++++-
 lib/internal.h                               |  3 ++-
 lib/line-request.c                           | 20 ++++++++++++++++++-
 tests/tests-line-request.c                   | 21 ++++++++++++++++++++
 14 files changed, 136 insertions(+), 13 deletions(-)
Signature · 1 line
2.39.2