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

Tom Rini trini at konsulko.com
Wed Nov 5 16:20:18 CET 2025


On Tue, Nov 04, 2025 at 06:44:55PM +0100, Rasmus Villemoes wrote:

> 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(-)

Thanks for doing your "civic duty" and fixing these up!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251105/b76a748c/attachment.sig>


More information about the U-Boot mailing list