From: Pavel Machek <pavel@ucw.cz>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: [RFC] Add extra PM_EVENT_* codes for use by subsystems
Date: Sat, 1 Mar 2008 12:47:18 +0100 [thread overview]
Message-ID: <20080301114718.GA17945@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0802291223300.6695-100000@iolanthe.rowland.org>
Hi!
> Is there any objection to adding extra PM_EVENT_* codes? Although they
> won't ever be issued by the PM core, they will come in handy for
> internal uses in power-aware subsystems (like USB).
I guess we cando that.
> Alan Stern
>
>
> Index: usb-2.6/include/linux/pm.h
> ===================================================================
> --- usb-2.6.orig/include/linux/pm.h
> +++ usb-2.6/include/linux/pm.h
> @@ -164,21 +164,40 @@ typedef struct pm_message {
> * well as during system sleep states like PM_SUSPEND_STANDBY. They may
> * be able to use wakeup events to exit from runtime low-power states,
> * or from system low-power states such as standby or suspend-to-RAM.
> + *
> + * The PM core will never issue the PMSG_ codes for USER_SUSPEND,
> + * USER_RESUME, REMOTE_WAKEUP, AUTOSUSPEND, or AUTORESUME. They are
> + * provided for internal use by power-aware subsystems.
> */
>
> -#define PM_EVENT_ON 0
> -#define PM_EVENT_FREEZE 1
> -#define PM_EVENT_SUSPEND 2
> -#define PM_EVENT_HIBERNATE 4
> -#define PM_EVENT_PRETHAW 8
> +#define PM_EVENT_ON 0x0000
> +#define PM_EVENT_FREEZE 0x0001
> +#define PM_EVENT_SUSPEND 0x0002
> +#define PM_EVENT_HIBERNATE 0x0004
> +#define PM_EVENT_PRETHAW 0x0008
I'd move that "not used by core" note here.
> +#define PM_EVENT_USER_SUSPEND 0x0010
> +#define PM_EVENT_USER_RESUME 0x0020
> +#define PM_EVENT_REMOTE_WAKEUP 0x0040
> +#define PM_EVENT_AUTOSUSPEND 0x0080
> +#define PM_EVENT_AUTORESUME 0x0100
>
> #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE)
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2008-03-01 11:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-29 17:27 [RFC] Add extra PM_EVENT_* codes for use by subsystems Alan Stern
2008-03-01 11:47 ` Pavel Machek [this message]
2008-03-02 12:57 ` Rafael J. Wysocki
2008-03-02 15:18 ` Alan Stern
2008-03-02 18:16 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080301114718.GA17945@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-pm@lists.linux-foundation.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox