lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gGuTDCf8Bsefyj5R6mF=SXZDrt7JacNU5vBZOf84QsvA@mail.gmail.com>
Date:   Tue, 19 Jun 2018 16:47:52 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Geert Uytterhoeven <geert+renesas@...der.be>
Cc:     "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
        Marek Vasut <marek.vasut+renesas@...il.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] PM / wakeup: Add callback for wake-up change notification

On Tue, Jun 19, 2018 at 3:55 PM, Geert Uytterhoeven
<geert+renesas@...der.be> wrote:
> Add a callback to inform a device that its wake-up setting has been
> changed.  This allows a device to synchronize device configuration with
> an external user action.
>
> E.g. on systems using a Rohm BD9571MWV PMIC and a toggle accessory power
> switch, the system suspend/resume procedure is:
>   1. Configure PMIC for DDR backup mode (by software), which changes the
>      role of the accessory power switch from a power to a wake-up
>      switch,
>   2. Switch accessory power switch off (manually), to prepare for system
>      suspend,
>   3. Suspend system (by software),
>   4. Switch accessory power switch on (manually), to wake up the system.
>
> As step 2 involves a manual operation, step 1 cannot be combined
> with step 3 and performed in the PMIC's suspend callback (unlike on
> systems with a momentary power switch).
>
> Adding the new callback allows to move step 1 to the new callback, to be
> performed in response to the user writing "enabled" to the PMIC's
> "wakeup" virtual file in sysfs.

I still don't quite understand this TBH.

In particular, why do you want a write to "wakeup" trigger this
instead of having a special sysfs attr for that exposed by your PMIC
driver?

Writing "enabled" to "wakeup" for the PMIC should enable the PMIC
itself to wake up the system, which isn't quite the case, or is it?

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ