[lkml]   [2018]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH/RFC 1/2] PM / wakeup: Add callback for wake-up change notification
Hi Rafael,

On Mon, Apr 23, 2018 at 11:18 AM, Rafael J. Wysocki <> wrote:
> On Wednesday, March 14, 2018 12:26:24 PM CEST Geert Uytterhoeven wrote:
>> Add a callback to inform a device that his 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 procedure is:
>> 1. Configure PMIC for DDR backup mode, which changes the role of the
>> accessory power switch from a power to a wake-up switch,
>> 2. Switch accessory power switch off, to prepare for system suspend,
>> 3. Suspend system.
>> Hence step 1 cannot be done in the PMIC's suspend callback,
> I don't quite understand this, so can you please explain?
> What can't it be done from ->prepare() or even from a suspend notifier?
>> but it can be done in the new callback, in response to the user writing "enabled"
>> to the PMIC's wakeup virtual file in sysfs.

Step 2 (flip a switch on the board) is a manual step, to be done by the user.
So it cannot be done from any suspend callback or notifier.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

 \ /
  Last update: 2018-04-23 11:32    [W:0.073 / U:22.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site