[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQdHmrchkmOr34r3@stanley.mountain>
Date: Sun, 2 Nov 2025 14:59:22 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Lee Jones <lee@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, Chen-Yu Tsai <wens@...nel.org>,
Rob Herring <robh@...nel.org>,
Peter Griffin <peter.griffin@...aro.org>, linaro-s32@...aro.org,
NXP S32 Linux Team <s32@....com>
Subject: [PATCH v2] mfd: syscon: return -EPROBE_DEFER if the syscon is not
found
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@...aro.org>
Reviewed-by: Arnd Bergmann <arnd@...db.de>
Reviewed-by: Chen-Yu Tsai <wens@...nel.org>
Acked-by: Rob Herring (Arm) <robh@...nel.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
Powered by blists - more mailing lists