Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] tools: provide a shared library with high-level functions used by gpio-tools
@ 2026-05-13 11:47 Bartosz Golaszewski
  2026-05-13 11:47 ` [PATCH 1/2] tools: provide the libgpiotools shared library Bartosz Golaszewski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2026-05-13 11:47 UTC (permalink / raw)
  To: Linus Walleij, Kent Gibson, Vincent Fazio, Alexander Dahl
  Cc: brgl, linux-gpio, Bartosz Golaszewski

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.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
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,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>


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

end of thread, other threads:[~2026-05-13 15:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 11:47 [PATCH 0/2] tools: provide a shared library with high-level functions used by gpio-tools Bartosz Golaszewski
2026-05-13 11:47 ` [PATCH 1/2] tools: provide the libgpiotools shared library Bartosz Golaszewski
2026-05-13 11:47 ` [PATCH 2/2] tools: reuse libgpiotools Bartosz Golaszewski
2026-05-13 15:18 ` [PATCH 0/2] tools: provide a shared library with high-level functions used by gpio-tools Kent Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox