All of lore.kernel.org
 help / color / mirror / Atom feed
* [libgpiod][PATCH 0/5] core: provide information about the parent chip in line requests
@ 2023-07-19 19:20 Bartosz Golaszewski
  2023-07-19 19:20 ` [libgpiod][PATCH 1/5] core: provide gpiod_line_request_get_chip_path() Bartosz Golaszewski
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Bartosz Golaszewski @ 2023-07-19 19:20 UTC (permalink / raw)
  To: Kent Gibson, Linus Walleij, Andy Shevchenko, Viresh Kumar
  Cc: linux-gpio, Bartosz Golaszewski

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

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 path to the character
device used to open it as a way of 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.

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

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

-- 
2.39.2


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

end of thread, other threads:[~2023-07-21  1:38 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19 19:20 [libgpiod][PATCH 0/5] core: provide information about the parent chip in line requests Bartosz Golaszewski
2023-07-19 19:20 ` [libgpiod][PATCH 1/5] core: provide gpiod_line_request_get_chip_path() Bartosz Golaszewski
2023-07-19 19:20 ` [libgpiod][PATCH 2/5] tests: add a test-case for gpiod_line_request_get_chip_path() Bartosz Golaszewski
2023-07-19 19:20 ` [libgpiod][PATCH 3/5] bindings: cxx: provide line_request::chip_path() Bartosz Golaszewski
2023-07-19 19:20 ` [libgpiod][PATCH 4/5] bindings: python: provide the chip_path property in line_request Bartosz Golaszewski
2023-07-19 19:20 ` [libgpiod][PATCH 5/5] bindings: rust: provide LineRequest::chip_path() Bartosz Golaszewski
2023-07-20  5:04   ` Erik Schilling
2023-07-20  8:04     ` Bartosz Golaszewski
2023-07-20  8:10       ` Erik Schilling
2023-07-20  3:27 ` [libgpiod][PATCH 0/5] core: provide information about the parent chip in line requests Kent Gibson
2023-07-20  7:59   ` Bartosz Golaszewski
2023-07-20  8:05     ` Kent Gibson
2023-07-20  8:25       ` Bartosz Golaszewski
2023-07-20  8:39         ` Kent Gibson
2023-07-20  8:49           ` Bartosz Golaszewski
2023-07-20  9:16             ` Kent Gibson
2023-07-20  9:38               ` Bartosz Golaszewski
2023-07-20  9:52                 ` Kent Gibson
2023-07-20 12:30                   ` Bartosz Golaszewski
2023-07-20 13:37                     ` Kent Gibson
2023-07-20 15:01                       ` Bartosz Golaszewski
2023-07-21  1:37                         ` Kent Gibson
2023-07-20  8:42     ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.