treewide: remove helpers for opening chips by name & number
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 15 Dec 2020 12:44:17 +0000 (13:44 +0100)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Thu, 17 Dec 2020 17:04:17 +0000 (18:04 +0100)
commiteb690e46efd09cd9a758ed1b19f99601f7b5de8a
tree81371396a34921e3a3a95e9cac24f9550d39c1cc
parentde84633d687961a485eda683dc06c79624ac855e
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>
19 files changed:
bindings/cxx/chip.cpp
bindings/cxx/gpiod.hpp
bindings/cxx/tests/tests-chip.cpp
bindings/cxx/tests/tests-event.cpp
bindings/cxx/tests/tests-iter.cpp
bindings/cxx/tests/tests-line.cpp
bindings/python/gpiodmodule.c
bindings/python/tests/gpiod_py_test.py
include/gpiod.h
lib/helpers.c
tests/tests-chip.c
tools/gpiodetect.c
tools/gpiofind.c
tools/gpioget.c
tools/gpioinfo.c
tools/gpiomon.c
tools/gpioset.c
tools/tools-common.c
tools/tools-common.h