From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Shaohua Li <shaohua.li@intel.com>
Cc: linux-pm@lists.linux-foundation.org, linux-acpi@vger.kernel.org,
stern@rowland.harvard.edu, david-b@pacbell.net,
dbrownell@users.sourceforge.net
Subject: Re: [RFC 1/5] devcore introduce wakeup_event callback
Date: Sun, 19 Oct 2008 21:42:56 +0200 [thread overview]
Message-ID: <200810192142.56798.rjw@sisk.pl> (raw)
In-Reply-To: <200810192104.17510.rjw@sisk.pl>
On Sunday, 19 of October 2008, Rafael J. Wysocki wrote:
> On Thursday, 11 of September 2008, Shaohua Li wrote:
> > Introduce .wakeup_event(). When a device gets a wakeup event,
> > the callback is called. The callback usually should disable wakeup event.
> >
> > ---
> > include/linux/pm.h | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > Index: linux/include/linux/pm.h
> > ===================================================================
> > --- linux.orig/include/linux/pm.h 2008-09-11 10:56:27.000000000 +0800
> > +++ linux/include/linux/pm.h 2008-09-11 10:56:29.000000000 +0800
> > @@ -125,6 +125,12 @@ typedef struct pm_message {
> > * make ANY assumptions about the hardware state right prior to @restore().
> > * On most platforms, there are no restrictions on availability of
> > * resources like clocks during @restore().
> > + * @wakeup_event: Checks if a wakeup event occurs. In bus level, the op might
> > + * check all devices under the bus and call device_receive_wakeup_event()
> > + * for devices which invoke wakeup event. In device level, the op just
> > + * returns if a wakeup event occurs. Note, if device follows standard
> > + * mechanism for wakeup which bus level can handle, device level op can be
> > + * empty.
> > *
> > * All of the above callbacks, except for @complete(), return error codes.
> > * However, the error codes returned by the resume operations, @resume(),
> > @@ -151,6 +157,7 @@ struct pm_ops {
> > int (*thaw)(struct device *dev);
> > int (*poweroff)(struct device *dev);
> > int (*restore)(struct device *dev);
> > + bool (*wakeup_event)(struct device *dev);
> > };
> >
> > /**
>
> I think it will be better to place wakeup_event() in 'struct device' itself
> rather than here.
That should be 'struct device_driver' actually, sorry.
Thanks,
Rafael
next prev parent reply other threads:[~2008-10-19 19:38 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-11 6:30 [RFC 0/5] device wakeup event support v2 Shaohua Li
2008-09-11 6:30 ` [RFC 1/5] devcore introduce wakeup_event callback Shaohua Li
2008-10-19 19:04 ` Rafael J. Wysocki
2008-10-19 19:42 ` Rafael J. Wysocki [this message]
2008-10-22 5:23 ` Shaohua Li
2008-09-11 6:30 ` [RFC 2/5] devcore adds generic wakeup event handler Shaohua Li
2008-09-11 18:48 ` Bjorn Helgaas
2008-10-19 19:06 ` Rafael J. Wysocki
2008-10-22 5:24 ` Shaohua Li
2008-10-22 11:57 ` Rafael J. Wysocki
2008-09-11 6:30 ` [RFC 3/5] pci wakeup handler Shaohua Li
2008-10-19 19:50 ` Rafael J. Wysocki
2008-10-22 5:34 ` Shaohua Li
2008-10-22 12:01 ` Rafael J. Wysocki
2008-09-11 6:30 ` [RFC 4/5] PCIe native PME detection Shaohua Li
2008-10-19 20:30 ` Rafael J. Wysocki
2008-10-22 5:49 ` Shaohua Li
2008-10-22 12:08 ` Rafael J. Wysocki
2008-09-11 6:30 ` [RFC 5/5] ACPI GPE based wakeup event detection Shaohua Li
2008-10-19 20:39 ` Rafael J. Wysocki
2008-10-22 6:51 ` Shaohua Li
2008-10-22 12:12 ` Rafael J. Wysocki
2008-09-14 23:50 ` [RFC 0/5] device wakeup event support v2 Rafael J. Wysocki
2008-10-06 1:57 ` Shaohua Li
-- strict thread matches above, loose matches on Subject: below --
2008-09-08 9:19 [RFC 0/5] device wakeup event support shaohua.li
2008-09-08 9:19 ` [RFC 1/5] devcore introduce wakeup_event callback shaohua.li
2008-09-09 2:56 ` David Brownell
2008-09-09 3:49 ` Li, Shaohua
2008-09-09 5:26 ` David Brownell
2008-09-09 8:36 ` Li, Shaohua
2008-09-09 11:45 ` Rafael J. Wysocki
2008-09-09 14:22 ` Alan Stern
2008-09-09 14:18 ` Alan Stern
2008-09-09 15:52 ` David Brownell
2008-09-09 18:39 ` Alan Stern
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=200810192142.56798.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=david-b@pacbell.net \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=shaohua.li@intel.com \
--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