mfd: syscon: return -EPROBE_DEFER if the syscon is not found
PATCH v2 1/1 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.
---
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/[email protected]/
drivers/mfd/syscon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/syscon.c +1 -1
@@ -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);
Signature · 1 line
2.51.0
Re: (subset) [PATCH v2] mfd: syscon: return -EPROBE_DEFER if the syscon is not found
Quoted 6 lines · Dan Carpenter
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 [李琼斯]