- Jan 06, 2020
-
-
Bartosz Golaszewski authored
Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Bartosz Golaszewski authored
Add release notes for libgpiod v1.5. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Bartosz Golaszewski authored
Improve the readability of help messages in all tools by adding a newline between the usage and summary sections. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Jan 03, 2020
-
-
Bartosz Golaszewski authored
Cleanup the main .gitignore: remove explicit filenames which are already implicitly ignored with pattern entries and move all the specific entries into appropriate sub-directories. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Jan 02, 2020
-
-
Bartosz Golaszewski authored
Extend the test coverage of Python bindings with tests of reading of multiple line events at once. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Bartosz Golaszewski authored
Add a new method to the Line class allowing to read up to 16 line events at once. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Bartosz Golaszewski authored
Extend the test coverage of C++ bindings with tests of reading of multiple line events at once. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Bartosz Golaszewski authored
Add a new method to gpiod::line class allowing to read up to 16 line events at once. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Dec 30, 2019
-
-
Bartosz Golaszewski authored
Add test cases for new helpers allowing users to read multiple events at once. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Dec 18, 2019
-
-
Bartosz Golaszewski authored
The kernel allows us to read multiple (up to 16) line events with a single read() call, but up to this point libgpiod only supported reading one event at a time. Add two new functions that allow users to read more events at the same time. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Dec 17, 2019
-
-
Bartosz Golaszewski authored
We can drop the redundant line state check if we directly call gpiod_line_event_get_fd() from gpiod_line_event_read(). As opposed to line_get_fd() it checks if the line was requested for events. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Dec 16, 2019
-
-
Bartosz Golaszewski authored
When '--host' option is passed to configure, the name of the generated libtool script will be prefixed with the value used as argument for '--host'. Add a pattern for prefixed 'libtool' scripts to .gitignore. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Dec 14, 2019
-
-
Bartosz Golaszewski authored
We're now checking for linux/version.h on every build - not only when building tests. Drop the redundant check. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Dec 12, 2019
-
-
Bartosz Golaszewski authored
Original libgpiod relied on linux headers v4.8 to build but it was only documented in README and not enforced at build-time. We now support features first available in linux v5.5. Add a check to configure.ac that verifies if recent enough kernel headers are available - otherwise we'd fail only when trying to build the library. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Dec 11, 2019
-
-
Joel Savitz authored
When Line.request() is called without the required 'consumer=value' argument, the module attempts access an empty dictionary object resulting in a segfault. This patch avoids such access when the dictionary is empty and maintains the current design where the LineBulk object is responsible for validation of arguments. Signed-off-by:
Joel Savitz <jsavitz@redhat.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Dec 10, 2019
-
-
Kent Gibson authored
Change the vals in gpiod_Line_set_value from a tuple of tuples to just a tuple. This brings it into line with other vals in the module such as gpiod_Line_set_config and gpiod_Line_set_direction_output. The previous usage made the vals equivalent to an args (a tuple of arguments equivalent to argc,argv in C), as per gpiod_Line_set_flags. Renaming vals to args in gpiod_Line_set_value was not an option as there is already an args parameter. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Minor formatting fix to make long text descriptions of params wrap under the text, not under the param name. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
The handling of NULL values by gpiod_line_set_value_bulk has been changed to interpret NULL as low values for all lines. This patch updates the documentation of the function to describe that. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Add tests for drive flags in gpioset. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Add support for drive flags to gpioset so that line drive flags (open-drain,open-source) can be set from the command line. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Add tests for bias flags to applicable tools - gpioget, gpioset, and gpiomon. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Add support for bias flags to applicable tools - gpioget, gpioset, and gpiomon. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Extend test coverage over set_config, set_flags, set_direction_input, and set_direction_output methods. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Add methods to support setting line configuration. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Restructured gpiod_LineBulk_set_values to move the conversion of values from Python tuple to int array into a helper function as it is useful for similar functions. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Extend test coverage over set_config, set_flags, set_direction_input, and set_direction_output methods. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Add methods to support setting line configuration. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Extend test coverage over the SET_CONFIG functions. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Extend the libgpiod API to support the setting line configuration using the GPIO GPIOHANDLE_SET_CONFIG_IOCTL uAPI ioctl. The core change is the addition of gpiod_line_set_config, which provides a low level wrapper around the ioctl. Additionally, higher level helper functions, gpiod_line_set_flags, gpiod_line_set_direction_input, and gpiod_line_set_direction_output provide slightly simplified APIs for common use cases. Bulk forms of all functions are also provided. Documented the fields of gpiod_line to better identify the purpose of each where the field name alone is not sufficiently clear, and to indicate which flags are applicable to each field. Implementation includes a few helper functions that serve to keep the code tidier and are consistent with similar helper functions already present. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Extend test coverage to cover the bias flags in requests and the bias setting returned by line.bias(). Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Add support for bias flags in line requests and returning the line bias setting via a bias accessor. Based on initial work by Drew Fustini <drew@pdp7.com>. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Dec 09, 2019
-
-
Kent Gibson authored
Extend test coverage over the bias flags in requests and the bias setting returned by line.bias(). Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Add support for bias flags in line requests and returning the line bias setting via a bias accessor. Based on initial work by Drew Fustini <drew@pdp7.com>. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Extend test coverage over the bias flags, gpiod_line_bias and the extended ctxless functions. Also update existing tests to check bias flags where line state is checked. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Extend the libgpiod API to support the bias flags recently added to the kernel GPIO uAPI. The core change is the addition of GPIOD_LINE_REQUEST_FLAG_BIAS_DISABLE, GPIOD_LINE_REQUEST_FLAG_BIAS_PULL_UP and GPIOD_LINE_REQUEST_FLAG_BIAS_PULL_DOWN flags to be passed into line_request functions, and the addition of gpiod_line_bias to return the bias state of lines. Variants of the ctxless functions that accept an active_low flag are added to also accept other flags. The variant names add a "_ext" suffix to the name of the original function. Based on initial work by Drew Fustini <drew@pdp7.com>. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Nov 26, 2019
-
-
Bartosz Golaszewski authored
s/There/These. Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Bartosz Golaszewski authored
Commit 9ed02fc7 ("build: check for python-config in configure") breaks cross-compilation because AC_CHECK_FILE() only checks the host machine. Use AC_CHECK_PROG() instead. Cc: Joel Savitz <joelsavitz@gmail.com> Fixes: 9ed02fc7 ("build: check for python-config in configure") Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Nov 23, 2019
-
-
Bartosz Golaszewski authored
This function and the logic behind have been introduced in an early version of libgpiod for reasons that have been long forgotten. When updating the line info after a line request fails, just propagate the error out of the request function instead of setting the internal needs_update variable. Drop the entire logic behind gpiod_needs_update(), make this routine always return false and mark it as deprecated in the header. Suggested-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
- Nov 18, 2019
-
-
Kent Gibson authored
Trivial grammar fix. "correspond with" can mean either being in agreement with, happening at the same time, or communication between parties. "correspond to" is used to mean equivalance, which is the intended use throughout the documentation. Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-
Kent Gibson authored
Change gpiod_line_set_value_bulk to interpret a NULL values pointer as an array of zero, as per gpiod_line_request_bulk, gpiod_line_set_config_bulk, and gpiod_line_set_direction_bulk_output. The old behaviour was to segfault. Add a corresponding test case for gpiod_line_set_value_bulk(). Signed-off-by:
Kent Gibson <warthog618@gmail.com> Signed-off-by:
Bartosz Golaszewski <bgolaszewski@baylibre.com>
-