Re: [PATCH v6] PM / wakeup: show wakeup sources stats in sysfs

From: Stephen Boyd
Date: Thu Aug 01 2019 - 19:40:37 EST


Quoting Rafael J. Wysocki (2019-08-01 15:46:33)
> On Fri, Aug 2, 2019 at 12:11 AM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote:
> >
> > Ok. If the device name is going to be something generic like 'wakeupN',
> > then we need to make sure that the wakeup source name is unique.
> > Otherwise, I'm not able to see how userspace will differentiate between
> > two of the same named wakelocks. Before this patch the wakeup source
> > name looks to have been used for debugging, but now it's being used
> > programmatically to let userspace act upon it somehow.
>
> I'm not actually sure if this patch changes the situation with respect
> to wakeup source names. User space still can use them for whatever
> it used to use the list in debugfs and that's it.
>
> That's what I mean by retaining the names for "backwards compatibility only".
>

Ok, got it. Maybe one day the name attribute will become unimportant if
we have a namespace and process aware wake lock API in userspace.