[PATCH v2] mfd: syscon: return -EPROBE_DEFER if the syscon is not found

Dan Carpenter posted 1 patch 3 months, 1 week ago
drivers/mfd/syscon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] mfd: syscon: return -EPROBE_DEFER if the syscon is not found
Posted by Dan Carpenter 3 months, 1 week ago
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>
---
v2: In v1, I added a property to the syscon yaml file, but those changes
    were not welcomed or required.  The "syscon" compatible means "have
    Linux create a regmap for me" and my property meant the opposite
    so it was kind of pointless.  So don't do that.

    Link to v1.
    https://lore.kernel.org/all/cover.1761753288.git.dan.carpenter@linaro.org/

 drivers/mfd/syscon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index ae71a2710bed..e5d5def594f6 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -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);
 
-- 
2.51.0
Re: (subset) [PATCH v2] mfd: syscon: return -EPROBE_DEFER if the syscon is not found
Posted by Lee Jones 2 months, 3 weeks ago
On Sun, 02 Nov 2025 14:59:22 +0300, Dan Carpenter wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] mfd: syscon: return -EPROBE_DEFER if the syscon is not found
      commit: b73d5593bfde6bf570d55bcff3576e35cdf4ec9a

--
Lee Jones [李琼斯]