public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mfd: syscon: return -EPROBE_DEFER if the syscon is not found
@ 2025-11-02 11:59 Dan Carpenter
  2025-11-13 14:32 ` (subset) " Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-11-02 11:59 UTC (permalink / raw)
  To: Lee Jones
  Cc: Arnd Bergmann, linux-kernel, kernel-janitors, Chen-Yu Tsai,
	Rob Herring, Peter Griffin, linaro-s32, NXP S32 Linux Team

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-13 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-02 11:59 [PATCH v2] mfd: syscon: return -EPROBE_DEFER if the syscon is not found Dan Carpenter
2025-11-13 14:32 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox