Re: [PATCH v1] PM: runtime: Add support to disable wakeup sources

From: Greg KH
Date: Sun Aug 21 2022 - 10:02:15 EST


On Sun, Aug 21, 2022 at 07:15:32PM +0530, Vimal Kumar wrote:
> User could find many wakeup sources available in the bsp, which
> they won't be using. Currently users can only get the status and
> list of enabled wakeup sources, but users can't disable it runtime.
> It's very difficult to find the driver for each wakeup sources from
> where it's getting enabled and make the changes for disabling it.
>
> This will help users to disable any wakeup sources at runtime,
> avoiding any code change and re-compilation. A new class attribute
> "disable_ws" will be added in the wakeup calss. If user want to disable
> any wakeup sources, user need to find the wakeup dev node associated
> with the particular wakeup source and write the devnode name to the
> class attribute "disable_ws".
>
> Example:
> Need to disable the wakeup source '1c08000.qcom,pcie'. The dev node
> associated with this wakeup source is:
> cat /sys/class/wakeup3/name ==> "1c08000.qcom,pcie", then for disabling
> this wakeup source :
> echo wakeup3 > /sys/class/wakeup/disable_ws
>
> Co-developed-by: Mintu Patel <mintupatel89@xxxxxxxxx>
> Signed-off-by: Mintu Patel <mintupatel89@xxxxxxxxx>
> Co-developed-by: Vishal Badole <badolevishal1116@xxxxxxxxx>
> Signed-off-by: Vishal Badole <badolevishal1116@xxxxxxxxx>
> Signed-off-by: Vimal Kumar <vimal.kumar32@xxxxxxxxx>

That's a lot of gmail accounts, no "company" accounts? :)

> ---
> drivers/base/power/wakeup_stats.c | 63 ++++++++++++++++++++++++++++++-

You need a Documentation/ABI/ entry for any new sysfs file so we can
properly review this and support it over time.

thanks,

greg k-h