Skip to content

reenable dm_gpio tests, add support for gpio-line-names lookup

Rasmus Villemoes u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest3 patches 5 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3test: gpio: include in build, and fixup bitrottest/dm/Makefile test/dm/gpio.c+9 -61 reply
2/3gpio: search gpio-line-names property in dm_gpio_lookup_namedrivers/gpio/Kconfig drivers/gpio/gpio-uclass.c+26 -11 reply
3/3test: gpio: add test for gpio-line-names lookuparch/sandbox/dts/test.dts test/dm/gpio.c+13 -01 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchHeiko Schocher
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] reenable dm_gpio tests, add support for gpio-line-names lookup

Hopefully third time's the charm.

I merely wanted to add support (mostly for use by the 'gpio' shell command) for looking up a gpio via the gpio-line-names DT property. We already have a "gpio_request_by_line_name()", but cmd/gpio.c does a separate "lookup + request", so it felt more natural to teach the lookup machinery this as well. That ran into OF_CONTROL-but-not-OF_LIBFDT being a thing for SPL, so here's yet another attempt.

Now, when trying to do my civic duty and add tests for this, I found that test/dm/gpio.c has been defunct for a couple of years, and reinstating it is not entirely trivial.

After a couple of rounds CI is now happy with this:
https://github.com/u-boot/u-boot/pull/828

Rasmus Villemoes (3):
test: gpio: include in build, and fixup bitrot
gpio: search gpio-line-names property in dm_gpio_lookup_name
test: gpio: add test for gpio-line-names lookup

 arch/sandbox/dts/test.dts  |  2 ++
 drivers/gpio/Kconfig       | 16 ++++++++++++++++
 drivers/gpio/gpio-uclass.c | 11 ++++++++++-
 test/dm/Makefile           |  2 +-
 test/dm/gpio.c             | 24 +++++++++++++++++++-----
 5 files changed, 48 insertions(+), 7 deletions(-)
Signature · 1 line
2.51.0