tools: provide a shared library with high-level functions used by gpio-tools
Status from this message: Applied, thanks!
Get series with b4
b4 am 20260513-tools-common-shared-lib-v1-0-58ac28a9f1d5@oss.qualcomm.com change-id 20260311-tools-common-shared-lib-97b58de050e2Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | tools: provide the libgpiotools shared librarydocs/ docs/ docs/ +4 more | +725 | 0 replies | |
| 2/2 | tools: reuse libgpiotoolstools/ tools/ tools/ | +47 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Kent Gibson |
|---|---|
| Series | A-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] tools: provide a shared library with high-level functions used by gpio-tools
The API of libgpiod v2 is a bit more limited than that of v1. Notably:
the whole category of high-level helpers as well as functions allowing to look up lines and chips by names/labels have been removed and replaced by low-level interfaces which require users to implement the look-up logic locally.
It's been requested several times that equivalents of these functions should be provided in some form. I don't want to expose more functionality in libgpiod core API than what the linux kernel uAPI provides. However, the gpio-tools already contain a shared library - tools-common - which implements the bulk of the desired functions in a new form.
This series splits out parts of tools-common into a new shared library:
libgpiotools, and reuses it in tools-common while keeping the existing interface facing the gpio-tools in order to not have to adapt them to the new API.
Kent: I allowed myself to change the license of the factored out code to LGPL-v2.1-or-later to enable linking against libgpiotools in line with libgpiod and other shared libraries from this project. Your Ack would be appreciated.
---
Bartosz Golaszewski (2):
tools: provide the libgpiotools shared library
tools: reuse libgpiotools
docs/Doxyfile | 1 + docs/gpio_tools.rst | 16 ++ docs/gpio_tools_lib.rst | 12 ++ meson.build | 3 + tools/gpiotools.c | 437 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/gpiotools.h | 236 ++++++++++++++++++++++++++ tools/meson.build | 28 +++- tools/tools-common.c | 316 ++++------------------------------ tools/tools-common.h | 63 +------ 9 files changed, 772 insertions(+), 340 deletions(-)
---
base-commit: 5eed939e0d544afa311a4dd6dac90833d38d7d29
change-id: 20260311-tools-common-shared-lib-97b58de050e2
Best regards,
Signature · 1 line
Bartosz Golaszewski <[email protected]>