Commit 8196f7bc authored by Etienne Carriere's avatar Etienne Carriere Committed by Mark Brown

spi: stm32-qspi: defer probe for reset controller

Changes stm32 QSPI driver to defer its probe operation when a reset
controller device have not yet probed but is registered in the
system.
Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
Signed-off-by: default avatarPatrice Chotard <patrice.chotard@st.com>
Link: https://lore.kernel.org/r/20200203135048.1299-2-patrice.chotard@st.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ea1e5b33
......@@ -615,7 +615,11 @@ static int stm32_qspi_probe(struct platform_device *pdev)
}
rstc = devm_reset_control_get_exclusive(dev, NULL);
if (!IS_ERR(rstc)) {
if (IS_ERR(rstc)) {
ret = PTR_ERR(rstc);
if (ret == -EPROBE_DEFER)
goto err;
} else {
reset_control_assert(rstc);
udelay(2);
reset_control_deassert(rstc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment