treewide: remove helpers for opening chips by name & number
Helper wrappers around gpiod_chip_open() shouldn't really be part of
the core, low-level library. They assume that devtmpfs is mounted at
/dev and that GPIO chips follow the gpiochipX naming convention.
This changeset removes all variants of gpiod_chip_open() other than
the one taking the path as argument. We're doing this treewide so
C++ and Python bindings lose the 'how' argument that currently allows
to change the way the chips are opened by the chip's constructors or
the open() method in C++.
The gpio-tools programs still support opening chips by number, name
and path but they implement this functionality locally rather than
using the library code.
Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Showing
- bindings/cxx/chip.cpp 5 additions, 36 deletionsbindings/cxx/chip.cpp
- bindings/cxx/gpiod.hpp 4 additions, 21 deletionsbindings/cxx/gpiod.hpp
- bindings/cxx/tests/tests-chip.cpp 13 additions, 84 deletionsbindings/cxx/tests/tests-chip.cpp
- bindings/cxx/tests/tests-event.cpp 7 additions, 7 deletionsbindings/cxx/tests/tests-event.cpp
- bindings/cxx/tests/tests-iter.cpp 1 addition, 1 deletionbindings/cxx/tests/tests-iter.cpp
- bindings/cxx/tests/tests-line.cpp 8 additions, 8 deletionsbindings/cxx/tests/tests-line.cpp
- bindings/python/gpiodmodule.c 6 additions, 51 deletionsbindings/python/gpiodmodule.c
- bindings/python/tests/gpiod_py_test.py 56 additions, 77 deletionsbindings/python/tests/gpiod_py_test.py
- include/gpiod.h 0 additions, 29 deletionsinclude/gpiod.h
- lib/helpers.c 0 additions, 57 deletionslib/helpers.c
- tests/tests-chip.c 0 additions, 41 deletionstests/tests-chip.c
- tools/gpiodetect.c 1 addition, 1 deletiontools/gpiodetect.c
- tools/gpiofind.c 1 addition, 1 deletiontools/gpiofind.c
- tools/gpioget.c 1 addition, 1 deletiontools/gpioget.c
- tools/gpioinfo.c 2 additions, 2 deletionstools/gpioinfo.c
- tools/gpiomon.c 1 addition, 1 deletiontools/gpiomon.c
- tools/gpioset.c 1 addition, 1 deletiontools/gpioset.c
- tools/tools-common.c 57 additions, 0 deletionstools/tools-common.c
- tools/tools-common.h 3 additions, 0 deletionstools/tools-common.h
Loading
Please register or sign in to comment