pinctrl: devicetree: Keep deferring even on timeout
authorThierry Reding <treding@nvidia.com>
Tue, 25 Aug 2020 14:33:48 +0000 (16:33 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 12 Sep 2020 16:19:53 +0000 (18:19 +0200)
commit84f28fc38d2ff99e2ac623325ba37809da611b8e
treea5e3b4eda712d09aa5df20909ecbdb9f0466ddf7
parent6d8e04f9d38345770572a39125a47da37bb8ce9e
pinctrl: devicetree: Keep deferring even on timeout

driver_deferred_probe_check_state() may return -ETIMEDOUT instead of
-EPROBE_DEFER after all built-in drivers have been probed. This can
cause issues for built-in drivers that depend on resources provided by
loadable modules.

One such case happens on Tegra where I2C controllers are used during
early boot to set up the system PMIC, so the I2C driver needs to be a
built-in driver. At the same time, some instances of the I2C controller
depend on the DPAUX hardware for pinmuxing. Since the DPAUX is handled
by the display driver, which is usually not built-in, the pin control
states will not become available until after the root filesystem has
been mounted and the display driver loaded from it.

Fixes: bec6c0ecb243 ("pinctrl: Remove use of driver_deferred_probe_check_state_continue()")
Suggested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20200825143348.1358679-1-thierry.reding@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/devicetree.c