diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2020-01-13 11:35:12 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-16 23:06:54 -0400 |
commit | d15c05b5d0abd24cc30a0bb4d155e487658b7a09 (patch) | |
tree | 8ab24c00b34581c1219e12a0e535fe8ee398bc0f /test/py | |
parent | 77ed5692c95abcb1cdda5b87570f661bbcf1b4b3 (diff) | |
download | u-boot-d15c05b5d0abd24cc30a0bb4d155e487658b7a09.tar.gz |
test: dm: update test for pins configuration in pinctrl node
Add test for "pins" configuration in gpio uclass with set_state() ops
and test for generic parsing of pinconf_param array).
set_state() is called by:
- pinctrl_generic_set_state
|- pinctrl_generic_set_state_subnode
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/tests/test_pinmux.py | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/test/py/tests/test_pinmux.py b/test/py/tests/test_pinmux.py index 25394f1faf..5ca0b4b630 100644 --- a/test/py/tests/test_pinmux.py +++ b/test/py/tests/test_pinmux.py @@ -22,11 +22,15 @@ def test_pinmux_usage_2(u_boot_console): def test_pinmux_status_all(u_boot_console): """Test that 'pinmux status -a' displays pin's muxing.""" output = u_boot_console.run_command('pinmux status -a') - assert ('SCL : I2C SCL' in output) - assert ('SDA : I2C SDA' in output) - assert ('TX : Uart TX' in output) - assert ('RX : Uart RX' in output) - assert ('W1 : 1-wire gpio' in output) + assert ('SCL : I2C SCL.' in output) + assert ('SDA : I2C SDA.' in output) + assert ('TX : Uart TX.' in output) + assert ('RX : Uart RX.' in output) + assert ('W1 : 1-wire gpio.' in output) + assert ('GPIO0 : gpio bias-pull-up input-disable.' in output) + assert ('GPIO1 : gpio drive-open-drain.' in output) + assert ('GPIO2 : gpio bias-pull-down input-enable.' in output) + assert ('GPIO3 : gpio bias-disable.' in output) @pytest.mark.buildconfigspec('cmd_pinmux') @pytest.mark.boardspec('sandbox') @@ -59,8 +63,12 @@ def test_pinmux_status(u_boot_console): """Test that 'pinmux status' displays selected pincontroller's pin muxing descriptions.""" output = u_boot_console.run_command('pinmux status') - assert ('SCL : I2C SCL' in output) - assert ('SDA : I2C SDA' in output) - assert ('TX : Uart TX' in output) - assert ('RX : Uart RX' in output) - assert ('W1 : 1-wire gpio' in output) + assert ('SCL : I2C SCL.' in output) + assert ('SDA : I2C SDA.' in output) + assert ('TX : Uart TX.' in output) + assert ('RX : Uart RX.' in output) + assert ('W1 : 1-wire gpio.' in output) + assert ('GPIO0 : gpio bias-pull-up input-disable.' in output) + assert ('GPIO1 : gpio drive-open-drain.' in output) + assert ('GPIO2 : gpio bias-pull-down input-enable.' in output) + assert ('GPIO3 : gpio bias-disable.' in output) |