From: Jinjie Ruan <ruanjinjie@huawei.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <broonie@kernel.org>, <vkoul@kernel.org>,
<akashast@codeaurora.org>, <dianders@chromium.org>,
<linux-arm-msm@vger.kernel.org>, <linux-spi@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] spi: spi-geni-qcom: Fix missing undo runtime PM changes at driver exit time
Date: Fri, 6 Sep 2024 11:31:17 +0800 [thread overview]
Message-ID: <050a6434-00f9-4bba-a122-52c3a23fcf70@huawei.com> (raw)
In-Reply-To: <hnos3f34ejabyw2yxtpxifskhklunvnufgsuilghjeuzipqkxi@udw5xfeum37a>
On 2024/9/6 11:15, Dmitry Baryshkov wrote:
> On Fri, Sep 06, 2024 at 11:13:45AM GMT, Jinjie Ruan wrote:
>> It's important to undo pm_runtime_use_autosuspend() with
>> pm_runtime_dont_use_autosuspend() at driver exit time unless driver
>> initially enabled pm_runtime with devm_pm_runtime_enable()
>> (which handles it for you).
>>
>> Hence, call pm_runtime_dont_use_autosuspend() at driver exit time
>> to fix it.
>>
>> Fixes: cfdab2cd85ec ("spi: spi-geni-qcom: Set an autosuspend delay of 250 ms")
>> ---
>> v2:
>> - Fix it directly instead of use devm_pm_runtime_enable().
>
> Why?
The devm* sequence will have some problem, which will not consistent
with the former.
Link:
https://lore.kernel.org/all/CAD=FV=VyDk-e2KNiuiBcACFAdrQmihOH6X6BSpGB+T1MsgsiKw@mail.gmail.com/
>
>> ---
>> drivers/spi/spi-geni-qcom.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
>> index fc2819effe2d..38857edbc785 100644
>> --- a/drivers/spi/spi-geni-qcom.c
>> +++ b/drivers/spi/spi-geni-qcom.c
>> @@ -1158,6 +1158,7 @@ static int spi_geni_probe(struct platform_device *pdev)
>> spi_geni_release_dma:
>> spi_geni_release_dma_chan(mas);
>> spi_geni_probe_runtime_disable:
>> + pm_runtime_dont_use_autosuspend(dev);
>> pm_runtime_disable(dev);
>> return ret;
>> }
>> @@ -1174,6 +1175,7 @@ static void spi_geni_remove(struct platform_device *pdev)
>>
>> spi_geni_release_dma_chan(mas);
>>
>> + pm_runtime_dont_use_autosuspend(&pdev->dev);
>> pm_runtime_disable(&pdev->dev);
>> }
>>
>> --
>> 2.34.1
>>
>
next prev parent reply other threads:[~2024-09-06 3:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 3:13 [PATCH v2 0/2] spi: geni-qcom: Fix incorrect free_irq() sequence Jinjie Ruan
2024-09-06 3:13 ` [PATCH v2 1/2] " Jinjie Ruan
2024-09-06 4:27 ` Mukesh Kumar Savaliya
2024-09-06 6:47 ` Jinjie Ruan
2024-09-06 10:57 ` Mukesh Kumar Savaliya
2024-09-06 3:13 ` [PATCH v2 2/2] spi: spi-geni-qcom: Fix missing undo runtime PM changes at driver exit time Jinjie Ruan
2024-09-06 3:15 ` Dmitry Baryshkov
2024-09-06 3:31 ` Jinjie Ruan [this message]
2024-09-06 3:36 ` Dmitry Baryshkov
2024-09-06 3:40 ` Jinjie Ruan
2024-09-06 3:43 ` Dmitry Baryshkov
2024-09-06 3:50 ` Jinjie Ruan
2024-09-06 3:52 ` Dmitry Baryshkov
2024-09-06 4:01 ` Jinjie Ruan
2024-09-06 4:03 ` Dmitry Baryshkov
2024-09-06 6:50 ` Jinjie Ruan
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=050a6434-00f9-4bba-a122-52c3a23fcf70@huawei.com \
--to=ruanjinjie@huawei.com \
--cc=akashast@codeaurora.org \
--cc=broonie@kernel.org \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=vkoul@kernel.org \
/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