Re: [PATCH v3 2/2] PM: runtime: add debugfs entry for pm_runtime_summary
From: Joshua Crofts
Date: Wed Nov 25 2026 - 09:29:33 EST
On 25-Nov-26 14:01, Rafael J. Wysocki (Intel) wrote:
> On Mon, Nov 23, 2026 at 10:07 AM Joshua Crofts <crofts@xxxxxxxxxx> wrote:
>>
>> Add a debugfs entry for showing the runtime statistics for devices with
>> PM runtime enabled.
>>
>> Signed-off-by: Joshua Crofts <crofts@xxxxxxxxxx>
>> ---
>> drivers/base/power/runtime.c | 86 ++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 86 insertions(+)
>>
>> diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
>> index 17aee68366cf..cf657251633e 100644
>> --- a/drivers/base/power/runtime.c
>> +++ b/drivers/base/power/runtime.c
>> @@ -14,6 +14,8 @@
>> #include <linux/pm_runtime.h>
>> #include <linux/pm_wakeirq.h>
>> #include <linux/rculist.h>
>> +#include <linux/debugfs.h>
>> +#include <linux/seq_file.h>
>> #include <trace/events/rpm.h>
>>
>> #include "../base.h"
>> @@ -2223,3 +2225,87 @@ bool pm_runtime_need_not_resume(struct device *dev)
>> }
>>
>> #endif /* CONFIG_PM_SLEEP */
>> +
>> +#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_PM_SLEEP)
>
> Why do you want to make it depend on CONFIG_PM_SLEEP?
>
> There's nothing related to system sleep in it AFAICS.
dpm_for_each_dev() is guarded by #ifdef CONFIG_PM_SLEEP.
--
Kind regards,
Joshua Crofts