lkml.org 
[lkml]   [2021]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 15/16] soc: imx: gpcv2: support reset defer probe
Date
From: Peng Fan <peng.fan@nxp.com>

When gpcv2 probe, the reset controller might not be ready, so we need
defer probe

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/soc/imx/gpcv2.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 072f519462a5..49dd137f6b94 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -784,9 +784,12 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
"Failed to get domain's clocks\n");

domain->reset = devm_reset_control_array_get_optional_exclusive(domain->dev);
- if (IS_ERR(domain->reset))
+ if (IS_ERR(domain->reset)) {
+ if (PTR_ERR(domain->reset) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
return dev_err_probe(domain->dev, PTR_ERR(domain->reset),
"Failed to get domain's resets\n");
+ }

pm_runtime_enable(domain->dev);

--
2.30.0
\
 
 \ /
  Last update: 2021-04-29 09:03    [W:0.165 / U:1.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site