[PATCH 04/34] x86: Probe device if needed in intel_gpio_xlate()

Simon Glass sjg at chromium.org
Sat Mar 27 04:18:41 CET 2021


The Intel GPIO binding allows GPIOs to be globally numbered, so that it
does not matter which GPIO bank is specified in the device tree. This is
convenient and avoid confusion since the banks do not have the same number
of GPIOs and the numbering is not sequential.

The GPIO uclass ensures that the device mentioned in the devicetree
binding is probed. It is fine for the driver to update gpio_desc to point
to a different driver, but this may not have been probed. If it has not
been, then it cannot be claimed since there is no uclass data.

We could handle this in the GPIO uclass but so far it is an unusual
situation so it is probably not worth the extra code. Handle this case in
the GPIO driver by probing the selected device if necessary.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/gpio/intel_gpio.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list