[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vf52m78FNKgTQ8c_y6UNaR91ANZh296tg6nz+reEv0DEg@mail.gmail.com>
Date: Thu, 22 Oct 2020 16:36:25 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Chen Yu <yu.c.chen@...el.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Linux PM <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][v2] PM / sysfs: Expose suspend resume driver flags in sysfs
On Thu, Oct 22, 2020 at 12:24 PM Chen Yu <yu.c.chen@...el.com> wrote:
>
> Currently there are 4 driver flags to control system suspend/resume
> behavior: DPM_FLAG_NO_DIRECT_COMPLETE, DPM_FLAG_SMART_PREPARE,
> DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME. Make these flags
> visible in sysfs as read-only to get a brief understanding of the
> expected behavior of each device during suspend/resume, so as to
> facilitate suspend/resume debugging/tuning.
>
> For example:
> /sys/devices/pci0000:00/0000:00:15.1/power/driver_flags:4
> (DPM_FLAG_SMART_SUSPEND)
>
> /sys/devices/pci0000:00/0000:00:07.3/power/driver_flags:5
> (DPM_FLAG_NO_DIRECT_COMPLETE | DPM_FLAG_SMART_SUSPEND)
...
> +What: /sys/devices/.../power/driver_flags
> +Date: October 2020
> +Contact: Chen Yu <yu.c.chen@...el.com>
> +Description:
> + The /sys/devices/.../driver_flags attribute contains the driver
> + flags to control system suspend/resume. The flag is a combination
> + of DPM_FLAG_NO_DIRECT_COMPLETE, DPM_FLAG_SMART_PREPARE,
> + DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME, or 0 if the
> + driver has not set any flag.
> This attribute is read-only. If
> + CONFIG_PM_ADVANCED_DEBUG is not set this attribute is empty.
Which makes me wonder why we even expose this if the above is not set.
...
> +static struct attribute *pm_driver_flags_attrs[] = {
> +#ifdef CONFIG_PM_ADVANCED_DEBUG
> +#ifdef CONFIG_PM_SLEEP
> + &dev_attr_driver_flags.attr,
> +#endif
> +#endif
> + NULL,
No comma here, please. I think I commented on this internally.
> +};
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists