pinctrl: sunxi: handle probe defferal
authorCorentin Labbe <clabbe@baylibre.com>
Thu, 2 Apr 2020 09:08:52 +0000 (09:08 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 16 Apr 2020 08:23:02 +0000 (10:23 +0200)
When checking the logs on my sun8i-a33-olinuxino I saw:
sun8i-a23-r-pinctrl 1f02c00.pinctrl: Reset controller missing
but this driver was working after.
This message is just here because the reset controller was still not probed.
So don't say anything if the return code say to wait.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Link: https://lore.kernel.org/r/1585818532-23051-1-git-send-email-clabbe@baylibre.com
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c

index 8a08c4afc6a8686dff0ed5c21b2bce0fe293b226..9e5b61449999adbd2a895b8e3d85cc90093950bd 100644 (file)
@@ -103,8 +103,11 @@ static int sun8i_a23_r_pinctrl_probe(struct platform_device *pdev)
 
        rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
        if (IS_ERR(rstc)) {
-               dev_err(&pdev->dev, "Reset controller missing\n");
-               return PTR_ERR(rstc);
+               ret = PTR_ERR(rstc);
+               if (ret == -EPROBE_DEFER)
+                       return ret;
+               dev_err(&pdev->dev, "Reset controller missing err=%d\n", ret);
+               return ret;
        }
 
        ret = reset_control_deassert(rstc);