[PATCH v4 03/12] test: pinmux: Add test for pin muxing

Simon Glass sjg at chromium.org
Fri Jul 3 02:46:13 CEST 2020


On Wed, 24 Jun 2020 at 04:30, Sean Anderson <seanga2 at gmail.com> wrote:
>
> 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 at gmail.com>
> ---
>
> Changes in v4:
> - Add sandbox dt-binding headers to MAINTAINERS
> - Add test/dm/pinmux.c to patch
> - Move sandbox_* variables into a priv structure. This resets them to the
>   default state every time we re-probe.
>
> Changes in v3:
> - Add dt-bindings/pinctrl/sandbox-pinmux.h to patch
>
> Changes in v2:
> - New
>
>  MAINTAINERS                                  |   1 +
>  arch/sandbox/dts/test.dts                    |  45 ++++-
>  drivers/pinctrl/pinctrl-sandbox.c            | 186 ++++++++++++++-----
>  include/dt-bindings/pinctrl/sandbox-pinmux.h |  19 ++
>  test/dm/Makefile                             |   3 +
>  test/dm/pinmux.c                             |  57 ++++++
>  test/py/tests/test_pinmux.py                 |  36 ++--
>  7 files changed, 274 insertions(+), 73 deletions(-)
>  create mode 100644 include/dt-bindings/pinctrl/sandbox-pinmux.h
>  create mode 100644 test/dm/pinmux.c

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list