]> Gentwo Git Trees - linux/.git/commitdiff
mfd: syscon: Return -EPROBE_DEFER if the syscon is not found
authorDan Carpenter <dan.carpenter@linaro.org>
Sun, 2 Nov 2025 11:59:22 +0000 (14:59 +0300)
committerLee Jones <lee@kernel.org>
Thu, 13 Nov 2025 14:32:39 +0000 (14:32 +0000)
These days we can register syscons with of_syscon_register_regmap() so
when we can't find the syscon that probably means it hasn't been
registered yet.  Return -EPROBE_DEFER so the driver will try probing
again.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/aQdHmrchkmOr34r3@stanley.mountain
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/syscon.c

index ae71a2710bed8bb6522d8be0624c3941c12715f1..e5d5def594f6e33e7e34fecfd2fb88981b9d55c9 100644 (file)
@@ -183,7 +183,7 @@ static struct regmap *device_node_get_regmap(struct device_node *np,
                if (create_regmap)
                        syscon = of_syscon_register(np, check_res);
                else
-                       syscon = ERR_PTR(-EINVAL);
+                       syscon = ERR_PTR(-EPROBE_DEFER);
        }
        mutex_unlock(&syscon_list_lock);