gpio / ACPI: Return -EPROBE_DEFER if the gpiochip was not found
gpio / ACPI: Return -EPROBE_DEFER if the gpiochip was not found

If a driver requests a GPIO described in its _CRS but the GPIO host
controller (gpiochip) driver providing the GPIO has not been loaded yet
acpi_get_gpiod() returns -ENODEV which causes the calling driver to fail.

If the gpiochip driver is loaded afterwards the driver requesting the GPIO
will not notice this.

Better approach is to return -EPROBE_DEFER in such case. Then when the
gpiochip driver appears the driver requesting the GPIO will be probed
again. This also aligns ACPI GPIO lookup code closer to DT as it does
pretty much the same when no gpiochip driver was found.

Reported-by: Tobias Diedrich <a8483794669dc946bfd790f5b18e9ebccc80787d@gmail.com>
Signed-off-by: Mika Westerberg <afb75201fb002d7fdd2b0b231e006999e00db8a9@linux.intel.com>
Acked-by: Rafael J. Wysocki <27ffc44a8ec6a212fba98cfc3246c6ce8ab131e0@intel.com>
Signed-off-by: Tobias Diedrich <18764ad83ed82d56dbd46405e1b3f0268dcfe1ec@tdiedrich.de>
Reviewed-by: Amos Kong <90521e0fa21ff7d99abc04652afcde67a68de6e0@gmail.com>
Signed-off-by: Linus Walleij <9cd9d802d23c0ed5e224beabf4ae4a5c478746ef@linaro.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs