]> git.dujemihanovic.xyz Git - u-boot.git/commit
test: pinmux: Add test for pin muxing
authorSean Anderson <seanga2@gmail.com>
Mon, 14 Sep 2020 15:01:57 +0000 (11:01 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 8 Oct 2020 15:42:36 +0000 (11:42 -0400)
commit7f0f1806e3a474dc15b6bad806b4afa967447774
tree67ae12ff6c548fe4c3f13177a8a4ef9b3ea781b8
parent5eee93e5b1ae9b2b31db99f774e0f635ad276068
test: pinmux: Add test for pin muxing

This extends the pinctrl-sandbox driver to support pin muxing, and adds a
test for that behaviour. The test is done in C and not python (like the
existing tests for the pinctrl uclass) because it needs to call
pinctrl_select_state.  Another option could be to add a command that
invokes pinctrl_select_state and then test everything in
test/py/tests/test_pinmux.py.

The pinctrl-sandbox driver now mimics the way that many pinmux devices
work.  There are two groups of pins which are muxed together, as well as
four pins which are muxed individually. I have tried to test all normal
paths. However, very few error cases are explicitly checked for.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
MAINTAINERS
arch/sandbox/dts/test.dts
drivers/pinctrl/pinctrl-sandbox.c
include/dt-bindings/pinctrl/sandbox-pinmux.h [new file with mode: 0644]
test/dm/Makefile
test/dm/pinmux.c [new file with mode: 0644]
test/py/tests/test_pinmux.py