From: Shawn Lin <shawn.lin@rock-chips.com>
To: Guangshuo Li <lgs201920130244@gmail.com>,
broonie@kernel.org, heiko@sntech.de, william.zhang@broadcom.com,
kursad.oney@broadcom.com, jonas.gorski@gmail.com
Cc: shawn.lin@rock-chips.com, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org, linusw@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, jon.lin@rock-chips.com,
bcm-kernel-feedback-list@broadcom.com, noltari@gmail.com
Subject: Re: [PATCH 2/3] spi: rockchip-sfc: Clean up runtime PM on remove
Date: Tue, 29 Sep 2026 10:21:31 +0800 [thread overview]
Message-ID: <23589ca5-7b7e-4f0a-8da7-1cd8ca8cdc6e@rock-chips.com> (raw)
In-Reply-To: <20260924112329.1566051-3-lgs201920130244@gmail.com>
Hi Guangshuo
在 2026/09/24 星期四 19:23, Guangshuo Li 写道:
> rockchip_sfc_probe() enables runtime PM and autosuspend before registering
> the controller. After a successful probe, rockchip_sfc_remove() tears down
> the controller and clocks without undoing that runtime PM setup.
>
> The probe error path resumes the device, drops the temporary usage count,
> disables runtime PM, marks the device suspended, and stops using
> autosuspend before disabling the clocks. The remove path lacks this
> matching cleanup.
>
> Mirror the existing error-path sequence in rockchip_sfc_remove() before
> disabling the clocks.
>
Thanks for this patch. However, it was fixed, see:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=34e32e9ade58e32daf933974c9b697d066fc5aaa
> Fixes: 8011709906d0 ("spi: rockchip-sfc: Support pm ops")
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
> ---
> drivers/spi/spi-rockchip-sfc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c
> index 662a994da60b..6e1c7d6318bb 100644
> --- a/drivers/spi/spi-rockchip-sfc.c
> +++ b/drivers/spi/spi-rockchip-sfc.c
> @@ -747,6 +747,12 @@ static void rockchip_sfc_remove(struct platform_device *pdev)
> DMA_BIDIRECTIONAL);
> free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize));
>
> + pm_runtime_get_sync(&pdev->dev);
> + pm_runtime_put_noidle(&pdev->dev);
> + pm_runtime_disable(&pdev->dev);
> + pm_runtime_set_suspended(&pdev->dev);
> + pm_runtime_dont_use_autosuspend(&pdev->dev);
> +
> clk_disable_unprepare(sfc->clk);
> clk_disable_unprepare(sfc->hclk);
> }
next prev parent reply other threads:[~2026-09-29 2:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 11:23 [PATCH 0/3] spi: balance remove-path teardown in three drivers Guangshuo Li
2026-09-24 11:23 ` [PATCH 1/3] spi: fsl: unmap immr_spi_cs on remove Guangshuo Li
2026-09-24 11:23 ` [PATCH 2/3] spi: rockchip-sfc: Clean up runtime PM " Guangshuo Li
2026-09-29 2:21 ` Shawn Lin [this message]
2026-09-24 11:23 ` [PATCH 3/3] spi: bcm63xx-hsspi: Disable " Guangshuo Li
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=23589ca5-7b7e-4f0a-8da7-1cd8ca8cdc6e@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=heiko@sntech.de \
--cc=jon.lin@rock-chips.com \
--cc=jonas.gorski@gmail.com \
--cc=kursad.oney@broadcom.com \
--cc=lgs201920130244@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=noltari@gmail.com \
--cc=william.zhang@broadcom.com \
/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
all inboxes | Powered by JetHome®