From: Pavan Kondeti <quic_pkondeti@quicinc.com>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
<linux-kernel@vger.kernel.org>, <patches@lists.linux.dev>,
<linux-arm-msm@vger.kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>
Subject: Re: [PATCH RESEND 1/2] soc: qcom: cmd-db: Mark device as having no PM support
Date: Mon, 22 Jul 2024 10:25:26 +0530 [thread overview]
Message-ID: <1cc3b5cb-a938-4768-a1eb-020e2d2f6ab8@quicinc.com> (raw)
In-Reply-To: <20221015004934.3930651-1-swboyd@chromium.org>
Hi Stephen,
On Fri, Oct 14, 2022 at 05:49:33PM -0700, Stephen Boyd wrote:
> This driver purely exposes information from memory to the kernel. Let's
> mark it as not having any device PM functionality, so that during
> suspend we skip even trying to call a suspend function on this device.
> This clears up suspend logs more than anything else, but it also shaves
> a few cycles off suspend.
>
> Cc: Konrad Dybcio <konrad.dybcio@somainline.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
>
> Resend to fix Bjorn's email.
>
> drivers/soc/qcom/cmd-db.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c
> index 629a7188b576..33856abd560c 100644
> --- a/drivers/soc/qcom/cmd-db.c
> +++ b/drivers/soc/qcom/cmd-db.c
> @@ -338,6 +338,8 @@ static int cmd_db_dev_probe(struct platform_device *pdev)
>
> debugfs_create_file("cmd-db", 0400, NULL, NULL, &cmd_db_debugfs_ops);
>
> + device_set_pm_not_required(&pdev->dev);
> +
> return 0;
> }
>
>
Sorry for asking this question here, thought it would be easy for you to
get the context.
I was recently reading this driver and learned about
device_set_pm_not_required() API. However, it is not clear how this is
working in practice?
The driver is calling device_set_pm_not_required() in probe(), however
all the checks for device_pm_not_required() happen before probe() is
called. For ex: dpm_sysfs_add() and device_pm_add() both happens before
probe(). I was expecting not to see
/sys/bus/platform/devices/XXXXXX.aop-cmd-db/power directory but it is
still present.
Also, I believe once driver set this flag, the device clean up might not
remove sysfs entries as we have device_pm_not_required() checks active
by that time.
Would it make sense to add code after probe() and take some action if
device_pm_not_required() returns true?
Thanks,
Pavan
prev parent reply other threads:[~2024-07-22 4:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-15 0:49 Stephen Boyd
2022-10-15 0:49 ` [PATCH RESEND 2/2] soc: qcom: stats: " Stephen Boyd
2022-10-18 3:15 ` [PATCH RESEND 1/2] soc: qcom: cmd-db: " Bjorn Andersson
2024-07-22 4:55 ` Pavan Kondeti [this message]
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=1cc3b5cb-a938-4768-a1eb-020e2d2f6ab8@quicinc.com \
--to=quic_pkondeti@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=swboyd@chromium.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
all inboxes | Powered by JetHome®