mbox series

[libgpiod,v2,0/3] api tweaks

Message ID 20220315053220.102934-1-warthog618@gmail.com
Headers show
Series api tweaks | expand

Message

Kent Gibson March 15, 2022, 5:32 a.m. UTC
This series builds on my recent doc tweaks series, picking up a few
things I missed there.

The first patch is another constistency renaming. This is the last
one of these - this time I checked all the function names in gpiod.h
to ensure all the functions follow the pattern.

The second is splitting chip_info out from chip.  This is probably
something you looked at before and decided against, but it bugs
me that the core library is doing more than it should here.

The final one is a variable renaming for clarity.  You use a "buf"
suffix to indicate the uAPI version of structs.  I find that confusing
as to me buf implies an array of structs.  I used a "u" for uAPI
prefix instead, though on reflection "k" for kernel might be more
visually distinct.  There are other examples of this throughout the
core - happy to do a respin including those - this one just fixes
line-info.c to bring it into line with the corresponding chip-info.c
introduced in the previous patch.

As with all my v2 patches, happy for you to apply them, or not,
in whatever way you find appropriate.

Cheers,
Kent.

Kent Gibson (3):
  core: rename gpiod_chip_info_event_wait and gpiod_chip_info_event_read
  core: split chip_info out of chip
  line-info: rename infobuf to uinfo

 include/gpiod.h            | 73 +++++++++++++++++++++++--------
 lib/Makefile.am            |  1 +
 lib/chip-info.c            | 72 ++++++++++++++++++++++++++++++
 lib/chip.c                 | 89 ++++++++++++++++----------------------
 lib/internal.h             |  2 +
 lib/line-info.c            | 38 ++++++++--------
 tests/Makefile.am          |  1 +
 tests/gpiod-test-helpers.h |  3 ++
 tests/tests-chip-info.c    | 54 +++++++++++++++++++++++
 tests/tests-chip.c         | 32 --------------
 tests/tests-info-event.c   | 22 +++++-----
 tools/gpiodetect.c         | 13 ++++--
 tools/gpiofind.c           |  8 +++-
 tools/gpioinfo.c           | 16 ++++---
 14 files changed, 283 insertions(+), 141 deletions(-)
 create mode 100644 lib/chip-info.c
 create mode 100644 tests/tests-chip-info.c


base-commit: 6e15b78d6e9c956c295c755aed793ffd963b1c53
prerequisite-patch-id: 4c18b0ccbdc27f0478078c520fc831c6f8e99cae
prerequisite-patch-id: 9813ae923bac1692f9558db3c09081c3d088ce78
prerequisite-patch-id: ebd388a7c411a6b730f23a6995852e62c07fb369
prerequisite-patch-id: bf291d6ac4300ed0ef6bf09eb187530098a7a338
prerequisite-patch-id: 3af98e60123f5e4b1199a2e0fb06eb6e1cfda18f
prerequisite-patch-id: 26c5fa12c404c09e78b9dfdf7fab5e3e7afcce4e