public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Francesco VIRLINZI <francesco.virlinzi@st.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: In Embedded system the dev_pm_info.power_state is useful
Date: Fri, 23 May 2008 16:32:16 +0200	[thread overview]
Message-ID: <4836D570.2020905@st.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0805231002160.2103-100000@iolanthe.rowland.org>

Hi Alan
Thank for your reply.
> That isn't the only way to check the power state.  You should have a 
> private data structure associated with each of the devices you care 
> about.  The address of the private data structure is what you store in 
> platform_set_drvdata().  In the private data structure you can have a 
> field to indicate the device's power state.
>   
Yes you are right.
The problem is that each driver can use the private_data as it wants, 
while I need a generic
 API to understand the power state of device.
Your suggestion works fine if (internally) we assume an agreement
 (i.e.: the first word in the private data is the power state) and in 
this manner
 I can analyse several IP with a single API.
But to do that (at the moment) I just do
    (dev->power.power_state.event == xx)

and PM_EVENT_ON/PM_EVENT_SUSPEND are good enough.

Why did you decide to remove it?

Regards
 Francesco


> If the platform-bus IP really is generic then you can't possibly know
> what its dev_pm_info.power_state value means, anyway.
>
> Alan Stern
>
>   

  reply	other threads:[~2008-05-23 14:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23  5:56 In Embedded system the dev_pm_info.power_state is useful Francesco VIRLINZI
2008-05-23  6:17 ` Francesco VIRLINZI
2008-05-23 14:07 ` Alan Stern
2008-05-23 14:32   ` Francesco VIRLINZI [this message]
2008-05-23 18:19     ` 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=4836D570.2020905@st.com \
    --to=francesco.virlinzi@st.com \
    --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