From: Alex Elder <elder@riscstar.com>
To: Frank Li <Frank.li@nxp.com>
Cc: han.xu@nxp.com, broonie@kernel.org, p.zabel@pengutronix.de,
dlan@gentoo.org, guodong@riscstar.com, linux-spi@vger.kernel.org,
imx@lists.linux.dev, spacemit@lists.linux.dev,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/8] spi: fsl-qspi: add optional reset support
Date: Tue, 21 Oct 2025 23:34:20 -0500 [thread overview]
Message-ID: <c93c1319-2f1f-4303-bb4b-751979f58149@riscstar.com> (raw)
In-Reply-To: <aPaIezCu/gXxJC01@lizhi-Precision-Tower-5810>
On 10/20/25 2:07 PM, Frank Li wrote:
> On Mon, Oct 20, 2025 at 11:51:46AM -0500, Alex Elder wrote:
>> Add support for one or more optional exclusive resets. These
>> simply need to be deasserted at probe time, and can remain that
>> way for the life of the device.
>
> Nit: please wrap at 75 chars
You're saying wrap at *longer* lengths, right? If not, please
clarify. I'll update in v2.
Thanks for the review.
-Alex
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
>>
>> Signed-off-by: Alex Elder <elder@riscstar.com>
>> ---
>> drivers/spi/spi-fsl-qspi.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
>> index c887abb028d77..1e27647dd2a09 100644
>> --- a/drivers/spi/spi-fsl-qspi.c
>> +++ b/drivers/spi/spi-fsl-qspi.c
>> @@ -36,6 +36,7 @@
>> #include <linux/of.h>
>> #include <linux/platform_device.h>
>> #include <linux/pm_qos.h>
>> +#include <linux/reset.h>
>> #include <linux/sizes.h>
>>
>> #include <linux/spi/spi.h>
>> @@ -267,6 +268,7 @@ struct fsl_qspi {
>> const struct fsl_qspi_devtype_data *devtype_data;
>> struct mutex lock;
>> struct completion c;
>> + struct reset_control *resets;
>> struct clk *clk, *clk_en;
>> struct pm_qos_request pm_qos_req;
>> struct device *dev;
>> @@ -857,6 +859,8 @@ static void fsl_qspi_cleanup(void *data)
>> {
>> struct fsl_qspi *q = data;
>>
>> + reset_control_assert(q->resets);
>> +
>> fsl_qspi_clk_disable_unprep(q);
>>
>> mutex_destroy(&q->lock);
>> @@ -902,6 +906,10 @@ static int fsl_qspi_probe(struct platform_device *pdev)
>> if (!q->ahb_addr)
>> return -ENOMEM;
>>
>> + q->resets = devm_reset_control_array_get_optional_exclusive(dev);
>> + if (IS_ERR(q->resets))
>> + return PTR_ERR(q->resets);
>> +
>> /* find the clocks */
>> q->clk_en = devm_clk_get(dev, "qspi_en");
>> if (IS_ERR(q->clk_en))
>> @@ -923,6 +931,10 @@ static int fsl_qspi_probe(struct platform_device *pdev)
>> if (ret)
>> return ret;
>>
>> + ret = reset_control_deassert(q->resets);
>> + if (ret)
>> + return ret;
>> +
>> /* find the irq */
>> ret = platform_get_irq(pdev, 0);
>> if (ret < 0)
>> --
>> 2.48.1
>>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-10-22 4:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 16:51 [PATCH 0/8] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
2025-10-20 16:51 ` [PATCH 1/8] dt-bindings: spi: fsl-qspi: add optional resets Alex Elder
2025-10-20 17:44 ` Conor Dooley
2025-10-20 18:06 ` Alex Elder
2025-10-20 16:51 ` [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
2025-10-20 17:39 ` Conor Dooley
2025-10-20 18:06 ` Alex Elder
2025-10-20 18:26 ` Mark Brown
2025-10-20 18:37 ` Alex Elder
2025-10-20 18:39 ` Conor Dooley
2025-10-22 4:34 ` Alex Elder
2025-10-20 17:41 ` Conor Dooley
2025-10-20 18:06 ` Alex Elder
2025-10-20 18:41 ` Conor Dooley
2025-10-20 16:51 ` [PATCH 3/8] spi: fsl-qspi: add optional reset support Alex Elder
2025-10-20 19:07 ` Frank Li
2025-10-22 4:34 ` Alex Elder [this message]
2025-10-20 16:51 ` [PATCH 4/8] spi: fsl-qspi: add a clock disable quirk Alex Elder
2025-10-20 19:13 ` Frank Li
2025-10-22 4:34 ` Alex Elder
2025-10-20 16:51 ` [PATCH 5/8] spi: fsl-qspi: allot 1KB per chip Alex Elder
2025-10-20 19:20 ` Frank Li
2025-10-22 4:34 ` Alex Elder
2025-10-20 16:51 ` [PATCH 6/8] spi: fsl-qspi: support the SpacemiT K1 SoC Alex Elder
2025-10-20 19:23 ` Frank Li
2025-10-22 4:34 ` Alex Elder
2025-10-20 16:51 ` [PATCH 7/8] riscv: dts: spacemit: enable K1 SoC QSPI on BPI-F3 Alex Elder
2025-10-20 16:51 ` [PATCH 8/8] riscv: defconfig: enable SPI_FSL_QUADSPI as a module Alex Elder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c93c1319-2f1f-4303-bb4b-751979f58149@riscstar.com \
--to=elder@riscstar.com \
--cc=Frank.li@nxp.com \
--cc=broonie@kernel.org \
--cc=dlan@gentoo.org \
--cc=guodong@riscstar.com \
--cc=han.xu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=spacemit@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox