From: Jon Lin <jon.lin@rock-chips.com>
To: Brian Norris <briannorris@chromium.org>
Cc: broonie@kernel.org, linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org, heiko@sntech.de,
linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH] spi: rockchip: Avoid redundant clock disable in pm operation
Date: Wed, 28 Aug 2024 15:09:08 +0800 [thread overview]
Message-ID: <c5726963-69a6-47d8-a576-86cebd481ef2@rock-chips.com> (raw)
In-Reply-To: <CA+ASDXMjN7dVUQWgfMULcD2KgF448-q=Ue2+MYUftK6Ra8MWhw@mail.gmail.com>
On 2024/8/27 10:59, Brian Norris wrote:
> On Mon, Aug 26, 2024 at 6:33 PM Jon Lin <jon.lin@rock-chips.com> wrote:
>> On 2024/8/27 6:27, Brian Norris wrote:
>>> It seems like you'd really be served well by
>>> pm_runtime_force_{suspend,resume}() here, and in fact, that's what this
>>> driver used to use before the breaking change (commit
>>> e882575efc77). Why aren't you just going back to using it? (This is the
>>> kind of thing I might expect in your commit message -- reasoning as to
>>> why you're doing what you're doing.)
>>>
>>> And in fact, I already submitted a patch that resolves the above problem
>>> and does exactly that:
>>>
>>> https://lore.kernel.org/all/20240823214235.1718769-1-briannorris@chromium.org/
>>> [PATCH] spi: rockchip: Resolve unbalanced runtime PM / system PM handling
>>>
>>> Do you see any problem with it?
>>>
>>
>> I have reviewed your submission and although the code has been
>> simplified, the execution efficiency has decreased. So although it is a
>> commonly used processing solution for SPI Upstream, I still hope to
>> retain a more efficiency approach as I submitted.
>
> What do you mean by "efficiency"? You mean because there's
> indirection, via the PM runtime framework? If so, I doubt that's a
> priority for this piece of functionality -- simplicity is more
> important than a function call or two when talking about system
> suspend.
>
Your code is fine, and I have tested it locally. The interface
simplification is indeed in line with the direction of community
development, and your solution can be used as a solution.
> Additionally, simplicity has additional benefits -- it heads off
> questions that your more complex code doesn't address. For example,
> are runtime PM and system PM mutually exclusive? Do we have to
> coordinate with any pending autosuspend? (Reading through
> https://docs.kernel.org/power/runtime_pm.html, I believe these are not
> actually concerns, but it's really not obvious and takes a bit of
> reading.) But your patch makes it more likely that runtime and system
> PM states get out of sync.
>
> Anyway, if the patches really are equivalent, I suppose it can be the
> maintainer's choice as to which is preferable.
>
> Brian
>
next prev parent reply other threads:[~2024-08-28 7:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240825035422.900370-1-jon.lin@rock-chips.com>
2024-08-26 22:27 ` [PATCH] spi: rockchip: Avoid redundant clock disable in pm operation Brian Norris
2024-08-27 1:32 ` Jon Lin
2024-08-27 2:59 ` Brian Norris
2024-08-28 7:09 ` Jon Lin [this message]
2024-08-27 3:05 ` Brian Norris
2024-08-24 5:14 Jon Lin
-- strict thread matches above, loose matches on Subject: below --
2024-08-24 5:07 Jon Lin
2024-08-24 4:57 Jon Lin
2024-08-24 17:02 ` Kuan-Wei Chiu
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=c5726963-69a6-47d8-a576-86cebd481ef2@rock-chips.com \
--to=jon.lin@rock-chips.com \
--cc=briannorris@chromium.org \
--cc=broonie@kernel.org \
--cc=heiko@sntech.de \
--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 \
/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