From: Andrew Morton <akpm@osdl.org>
To: Patrick Mochel <mochel@digitalimplant.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org, linux-pm@osdl.org
Subject: Re: [PATCH 2/5] [pm] Add state field to pm_message_t (to hold actual state device is in)
Date: Fri, 17 Feb 2006 22:10:09 -0800 [thread overview]
Message-ID: <20060217221009.30f29aa2.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.50.0602172136240.6792-100000@monsoon.he.net>
[-- Attachment #1: Type: text/plain, Size: 2385 bytes --]
Patrick Mochel <mochel@digitalimplant.org> wrote:
>
>
> On Fri, 17 Feb 2006, Andrew Morton wrote:
>
> > Patrick Mochel <mochel@digitalimplant.org> wrote:
> > >
> > >
> > > Signed-off-by: Patrick Mochel <mochel@linux.intel.com>
> > >
> > > ---
> > >
> > > include/linux/pm.h | 1 +
> > > 1 files changed, 1 insertions(+), 0 deletions(-)
> > >
> > > applies-to: 1ac50ba99ca37c65bdf3643c4056c246e401c18a
> > > 63b8e7f0896ce93834ac60c15df954b1e6d45e56
> > > diff --git a/include/linux/pm.h b/include/linux/pm.h
> > > index 5be87ba..a7324ea 100644
> > > --- a/include/linux/pm.h
> > > +++ b/include/linux/pm.h
> > > @@ -140,6 +140,7 @@ struct device;
> > >
> > > typedef struct pm_message {
> > > int event;
> > > + u32 state;
> > > } pm_message_t;
> >
> > I don't quite understand. This is a message which is sent to a driver
> > saying "go into this state", isn't it?
>
> .event is one of these:
>
> #define PM_EVENT_ON 0
> #define PM_EVENT_FREEZE 1
> #define PM_EVENT_SUSPEND 2
>
> Which only says what to do - turn on or off (AFAICT, FREEZE and SUSPEND
> are synonymous). They are designed to work when the entire system is being
> suspended or resumed, since every device is most likely going into its
> lowest power state.
>
> However, some devices support >1 low-power state which can be used to save
> power while the system is otherwise fully up and running. Devices that are
> not being used will most likely use the lowest power state, but devices
> that are idle (and that support >1 low power state) can use the other
> states even when idle.
>
> In reality, there aren't many devices or drivers that support >1 low-power
> state. But, there are some and likely to be more. And, the interface had
> always supported it until some time in the 2.6.16 development cycle.
>
> Does that help?
>
It does, thanks.
Would it make sense to enumerate these low-power states, rather than a bare
u32?
How, from the above message, is the driver to know that it's being asked
for a low-power state rather than an `off' state? Via `state' I guess.
I can see that the kernel would have trouble asking a device to go into a
particular low-power state because of the variation in capabilities between
devices. Perhaps the kernel should send the driver some higher-level piece
of information informing it what's going on, let the driver choose an
appropriate power state?
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@osdl.org>
To: Patrick Mochel <mochel@digitalimplant.org>
Cc: greg@kroah.com, torvalds@osdl.org, linux-kernel@vger.kernel.org,
linux-pm@osdl.org
Subject: Re: [PATCH 2/5] [pm] Add state field to pm_message_t (to hold actual state device is in)
Date: Fri, 17 Feb 2006 22:10:09 -0800 [thread overview]
Message-ID: <20060217221009.30f29aa2.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.50.0602172136240.6792-100000@monsoon.he.net>
Patrick Mochel <mochel@digitalimplant.org> wrote:
>
>
> On Fri, 17 Feb 2006, Andrew Morton wrote:
>
> > Patrick Mochel <mochel@digitalimplant.org> wrote:
> > >
> > >
> > > Signed-off-by: Patrick Mochel <mochel@linux.intel.com>
> > >
> > > ---
> > >
> > > include/linux/pm.h | 1 +
> > > 1 files changed, 1 insertions(+), 0 deletions(-)
> > >
> > > applies-to: 1ac50ba99ca37c65bdf3643c4056c246e401c18a
> > > 63b8e7f0896ce93834ac60c15df954b1e6d45e56
> > > diff --git a/include/linux/pm.h b/include/linux/pm.h
> > > index 5be87ba..a7324ea 100644
> > > --- a/include/linux/pm.h
> > > +++ b/include/linux/pm.h
> > > @@ -140,6 +140,7 @@ struct device;
> > >
> > > typedef struct pm_message {
> > > int event;
> > > + u32 state;
> > > } pm_message_t;
> >
> > I don't quite understand. This is a message which is sent to a driver
> > saying "go into this state", isn't it?
>
> .event is one of these:
>
> #define PM_EVENT_ON 0
> #define PM_EVENT_FREEZE 1
> #define PM_EVENT_SUSPEND 2
>
> Which only says what to do - turn on or off (AFAICT, FREEZE and SUSPEND
> are synonymous). They are designed to work when the entire system is being
> suspended or resumed, since every device is most likely going into its
> lowest power state.
>
> However, some devices support >1 low-power state which can be used to save
> power while the system is otherwise fully up and running. Devices that are
> not being used will most likely use the lowest power state, but devices
> that are idle (and that support >1 low power state) can use the other
> states even when idle.
>
> In reality, there aren't many devices or drivers that support >1 low-power
> state. But, there are some and likely to be more. And, the interface had
> always supported it until some time in the 2.6.16 development cycle.
>
> Does that help?
>
It does, thanks.
Would it make sense to enumerate these low-power states, rather than a bare
u32?
How, from the above message, is the driver to know that it's being asked
for a low-power state rather than an `off' state? Via `state' I guess.
I can see that the kernel would have trouble asking a device to go into a
particular low-power state because of the variation in capabilities between
devices. Perhaps the kernel should send the driver some higher-level piece
of information informing it what's going on, let the driver choose an
appropriate power state?
next prev parent reply other threads:[~2006-02-18 6:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-18 2:03 [PATCH 2/5] [pm] Add state field to pm_message_t (to hold actual state device is in) Patrick Mochel
2006-02-18 2:03 ` Patrick Mochel
2006-02-18 5:09 ` Andrew Morton
2006-02-18 5:09 ` Andrew Morton
2006-02-18 5:45 ` Patrick Mochel
2006-02-18 5:45 ` Patrick Mochel
2006-02-18 6:10 ` Andrew Morton [this message]
2006-02-18 6:10 ` Andrew Morton
2006-02-18 6:56 ` Patrick Mochel
2006-02-18 6:56 ` Patrick Mochel
2006-02-18 15:51 ` Pavel Machek
2006-02-18 15:51 ` [linux-pm] " Pavel Machek
2006-02-18 20:15 ` Alan Stern
2006-02-18 20:15 ` Alan Stern
2006-02-19 23:57 ` Patrick Mochel
2006-02-19 23:57 ` Patrick Mochel
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=20060217221009.30f29aa2.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@osdl.org \
--cc=mochel@digitalimplant.org \
--cc=torvalds@osdl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.