Re: [PATCH v2 1/2] PM / wakeup: Add callback for wake-up change notification
From: Mark Brown
Date: Wed Jun 20 2018 - 06:36:14 EST
On Wed, Jun 20, 2018 at 10:02:41AM +0200, Rafael J. Wysocki wrote:
> On Tuesday, June 19, 2018 5:22:06 PM CEST Geert Uytterhoeven wrote:
> > On Tue, Jun 19, 2018 at 4:48 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> > > On Tue, Jun 19, 2018 at 3:55 PM, Geert Uytterhoeven
> > In v1 (https://patchwork.kernel.org/patch/9996567/), I had a
> > driver-specific "backup_mode" sysfs file.
> > In v2 and later of the driver series (https://lkml.org/lkml/2018/4/18/345),
> > I changed that to use the standard "wakeup" file in sysfs, in response to
> > a comment from Mark Brown.
> Well, I'm not convinced that this is the right approach, though.
The original description of the changes made it sound like this
controlled if the power switch would make the device resume from suspend
or not which seems like a wakeup to me. Honestly as things are I've no
idea what the hardware designers were thinking or how to explain what
this stuff is doing.
> > Do you still prefer a driver-specific sysfs file?
> Yes, I do.
The flip side of that is that either suspend and resume or poweroff are
broken for userspace unless they know about this magic sysfs file which
isn't great either.
Attachment:
signature.asc
Description: PGP signature