<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/py/tests/test_gpio.py, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>test/py: gpio: allow omitting gpio_op_pin</title>
<updated>2026-03-25T20:38:15+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2026-03-12T20:33:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0f101dac8fb6792f981c78ccd7a284e553ce5764'/>
<id>0f101dac8fb6792f981c78ccd7a284e553ce5764</id>
<content type='text'>
Modify tests that make use of gpio_op_pin from env__gpio_dev_config to
be skipped if gpio_op_pin is not provided. This is useful in cases where
one might not be sure which GPIOs are safe to use as outputs that can be
toggled without causing problems.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modify tests that make use of gpio_op_pin from env__gpio_dev_config to
be skipped if gpio_op_pin is not provided. This is useful in cases where
one might not be sure which GPIOs are safe to use as outputs that can be
toggled without causing problems.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: gpio: removing trailing semicolons</title>
<updated>2026-03-25T20:38:15+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2026-03-12T20:33:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=908db6c647ce1cf265f0bafd98578ad903c16a04'/>
<id>908db6c647ce1cf265f0bafd98578ad903c16a04</id>
<content type='text'>
Remove trailing semicolons in test_gpio.py. Python does not require
them and they are considered improper style.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove trailing semicolons in test_gpio.py. Python does not require
them and they are considered improper style.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: gpio: remove unused imports</title>
<updated>2026-03-25T20:38:15+00:00</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2026-03-12T20:33:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b02b0a0c6cb1b977718d05182ac492f04c996561'/>
<id>b02b0a0c6cb1b977718d05182ac492f04c996561</id>
<content type='text'>
Remove unused imports in test_gpio.py.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unused imports in test_gpio.py.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Drop u_boot_ prefix on test files</title>
<updated>2025-03-15T11:02:04+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-09T16:07:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d9ed4b75add4b4ccc37cf32b54cd9c77f48e3396'/>
<id>d9ed4b75add4b4ccc37cf32b54cd9c77f48e3396</id>
<content type='text'>
We know this is U-Boot so the prefix serves no purpose other than to
make things longer and harder to read. Drop it and rename the files.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # test_android / test_dfu
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We know this is U-Boot so the prefix serves no purpose other than to
make things longer and harder to read. Drop it and rename the files.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # test_android / test_dfu
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Shorten u_boot_console</title>
<updated>2025-03-15T10:38:38+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2025-02-09T16:07:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=752c3769874596d012cd8325099d2ae20123f989'/>
<id>752c3769874596d012cd8325099d2ae20123f989</id>
<content type='text'>
This fixture name is quite long and results in lots of verbose code.
We know this is U-Boot so the 'u_boot_' part is not necessary.

But it is also a bit of a misnomer, since it provides access to all the
information available to tests. It is not just the console.

It would be too confusing to use con as it would be confused with
config and it is probably too short.

So shorten it to 'ubman'.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixture name is quite long and results in lots of verbose code.
We know this is U-Boot so the 'u_boot_' part is not necessary.

But it is also a bit of a misnomer, since it provides access to all the
information available to tests. It is not just the console.

It would be too confusing to use con as it would be confused with
config and it is probably too short.

So shorten it to 'ubman'.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: gpio: Add gpio pins generic test</title>
<updated>2024-01-29T15:31:24+00:00</updated>
<author>
<name>Love Kumar</name>
<email>love.kumar@amd.com</email>
</author>
<published>2024-01-19T05:38:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d07f9e6661d380576c5e346d70ce9812935885e8'/>
<id>d07f9e6661d380576c5e346d70ce9812935885e8</id>
<content type='text'>
Add gpio pins generic test for the set of gpio pin list to test various
gpio related functionality, such as the input, set, clear, and toggle,
it also tests the input and output functionality for shorted gpio pins.
This test depends on boardenv* configuration to define gpio pins names.

Signed-off-by: Love Kumar &lt;love.kumar@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add gpio pins generic test for the set of gpio pin list to test various
gpio related functionality, such as the input, set, clear, and toggle,
it also tests the input and output functionality for shorted gpio pins.
This test depends on boardenv* configuration to define gpio pins names.

Signed-off-by: Love Kumar &lt;love.kumar@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Make test_gpio_read() independent</title>
<updated>2022-09-12T22:06:36+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-08-06T23:51:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b681669aa533346b648995ae8c4bd9d257ea920a'/>
<id>b681669aa533346b648995ae8c4bd9d257ea920a</id>
<content type='text'>
This assumes that the GPIO starts as 0 but it does not if
test_gpio_input() ran first and test_gpio_exit_statuses() was skipped.
This can happen when running tests in parallel.

Fix it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This assumes that the GPIO starts as 0 but it does not if
test_gpio_input() ran first and test_gpio_exit_statuses() was skipped.
This can happen when running tests in parallel.

Fix it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: gpio: Add `gpio read` subcommand</title>
<updated>2022-04-20T15:14:39+00:00</updated>
<author>
<name>Diego Rondini</name>
<email>diego.rondini@kynetics.com</email>
</author>
<published>2022-04-11T10:02:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dd2b8c1155d016800cbbaa1bd70efdd81f9da493'/>
<id>dd2b8c1155d016800cbbaa1bd70efdd81f9da493</id>
<content type='text'>
As explained in commit 4af2a33ee5b9 ("cmd: gpio: Make `gpio input`
return pin value again") the `gpio input` is used in scripts to obtain
the value of a pin, despite the fact that CMD_RET_FAILURE is
indistinguishable from a valid pin value.
To be able to detect failures and properly use the value of a GPIO in
scripts we introduce the `gpio read` command that sets the variable
`name` to the value of the pin. Return code of the `gpio read` command
can be used to check for CMD_RET_SUCCESS or CMD_RET_FAILURE.
CONFIG_CMD_GPIO_READ is used to enable the `gpio read` command.

Signed-off-by: Diego Rondini &lt;diego.rondini@kynetics.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As explained in commit 4af2a33ee5b9 ("cmd: gpio: Make `gpio input`
return pin value again") the `gpio input` is used in scripts to obtain
the value of a pin, despite the fact that CMD_RET_FAILURE is
indistinguishable from a valid pin value.
To be able to detect failures and properly use the value of a GPIO in
scripts we introduce the `gpio read` command that sets the variable
`name` to the value of the pin. Return code of the `gpio read` command
can be used to check for CMD_RET_SUCCESS or CMD_RET_FAILURE.
CONFIG_CMD_GPIO_READ is used to enable the `gpio read` command.

Signed-off-by: Diego Rondini &lt;diego.rondini@kynetics.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py:Update python tests for ‘gpio’ cmd</title>
<updated>2022-04-08T19:17:23+00:00</updated>
<author>
<name>Adarsh Babu Kalepalli</name>
<email>opensource.kab@gmail.com</email>
</author>
<published>2021-05-31T10:53:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=965b989fb6cfdca194a65b7bf1f41483afbc2fd0'/>
<id>965b989fb6cfdca194a65b7bf1f41483afbc2fd0</id>
<content type='text'>
Generic Python Test cases are developed to verfiy 'gpio' command.

Signed-off-by: Adarsh Babu Kalepalli &lt;opensource.kab@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generic Python Test cases are developed to verfiy 'gpio' command.

Signed-off-by: Adarsh Babu Kalepalli &lt;opensource.kab@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: gpio: Make `gpio input` return pin value again</title>
<updated>2020-03-13T13:30:30+00:00</updated>
<author>
<name>Alex Kiernan</name>
<email>alex.kiernan@gmail.com</email>
</author>
<published>2020-03-11T08:46:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4af2a33ee5b91223f993af9bb0de1a081090634b'/>
<id>4af2a33ee5b91223f993af9bb0de1a081090634b</id>
<content type='text'>
4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value") correctly
changed the behaviour of the gpio command to return CMD_RET_SUCCESS or
CMD_RET_FAILURE, but any existing script which expects the return value
to be the pin value is broken by this change.

Reinstate the legacy behaviour for `gpio input` only.

Fixes: 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value")
Signed-off-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
Signed-off-by: Alex Kiernan &lt;alex.kiernan@hivehome.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value") correctly
changed the behaviour of the gpio command to return CMD_RET_SUCCESS or
CMD_RET_FAILURE, but any existing script which expects the return value
to be the pin value is broken by this change.

Reinstate the legacy behaviour for `gpio input` only.

Fixes: 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value")
Signed-off-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
Signed-off-by: Alex Kiernan &lt;alex.kiernan@hivehome.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
