gpio: search for gpio label if gpio is not found through bank name
authorHeiko Schocher <hs@denx.de>
Fri, 22 May 2020 09:08:59 +0000 (11:08 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 7 Jul 2020 22:23:37 +0000 (18:23 -0400)
commit2bd261dd1712561b8363fbf6f9f630176fe99caa
treef548548dc02b230f25c634764d08f3908d59a9e8
parent400880010333aaf85cd8630e9e457a8b75311dec
gpio: search for gpio label if gpio is not found through bank name

dm_gpio_lookup_name() searches for a gpio through
the bank name. But we have also gpio labels, and it
makes sense to search for a gpio also in the labels
we have defined, if no gpio is found through the
bank name definition.

This is useful for example if you have a wp pin on
different gpios on different board versions.

If dm_gpio_lookup_name() searches also for the gpio labels,
you can give the gpio an unique label name and search
for this label, and do not need to differ between
board revisions.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Don't enable by default]
Signed-off-by: Tom Rini <trini@konsulko.com>
drivers/gpio/Kconfig
drivers/gpio/gpio-uclass.c
test/dm/gpio.c