bindings: python: tests: add coverage of kernel reconfigure as-is behaviour
authorKent Gibson <warthog618@gmail.com>
Wed, 26 Jun 2024 05:38:08 +0000 (13:38 +0800)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 8 Jul 2024 09:50:20 +0000 (11:50 +0200)
commitd2466f5ae2b4541ec6d231e1cb5f00e86ec51195
tree284fcd08b02b719b100f9db797d3e38b6c72a812
parentfd57153ab2ba0d05f359f21eb72765ac1ede8fb5
bindings: python: tests: add coverage of kernel reconfigure as-is behaviour

The kernel's handling of reconfigure with default values, as is the
case for providing a None value as the settings to the Python bindings'
reconfigure_lines(), resets any flags set to non-default values when the
line is requested to their default values.  While the flags are cleared,
the kernel makes no corresponding change to the electrical settings -
though subsequent calls to get and set values will apply the updated
flags.

The tests for missing or None settings are extended to demonstrate the
issue for active_low and drive flags, though the issue applies to all
flags.

The tests fail unless the kernel is patched to ignore reconfiguration
of lines without direction set.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20240626053808.179457-4-warthog618@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
bindings/python/tests/tests_line_request.py