[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200203135048.1299-2-patrice.chotard@st.com>
Date: Mon, 3 Feb 2020 14:50:47 +0100
From: <patrice.chotard@...com>
To: Mark Brown <broonie@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...com>,
<linux-spi@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
CC: <patrice.chotard@...com>, <christophe.kerello@...com>,
Etienne Carriere <etienne.carriere@...com>
Subject: [PATCH 1/2] spi: stm32-qspi: defer probe for reset controller
From: Etienne Carriere <etienne.carriere@...com>
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: Etienne Carriere <etienne.carriere@...com>
Signed-off-by: Patrice Chotard <patrice.chotard@...com>
---
drivers/spi/spi-stm32-qspi.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c
index 4ef569b47aa6..13bb64bf4c8f 100644
--- a/drivers/spi/spi-stm32-qspi.c
+++ b/drivers/spi/spi-stm32-qspi.c
@@ -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);
--
2.17.1
Powered by blists - more mailing lists