All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: any global parameter to know system power state
       [not found] <CANudz+tjdjwZvSRmYxDO67M0LTqjbPK2iZTMPLerZZnBufLixA@mail.gmail.com>
@ 2013-10-10 11:31 ` loody
  2013-10-10 12:15   ` Daniel Lezcano
  0 siblings, 1 reply; 5+ messages in thread
From: loody @ 2013-10-10 11:31 UTC (permalink / raw)
  To: linux-pm@vger.kernel.org

hi all:
Is there any global parameter which can let us know the pm state?
Such that we can apply different software workaround in our embedded
system by different power state.

Thanks for your help in advance,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: any global parameter to know system power state
  2013-10-10 11:31 ` any global parameter to know system power state loody
@ 2013-10-10 12:15   ` Daniel Lezcano
  2013-10-10 13:52     ` loody
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Lezcano @ 2013-10-10 12:15 UTC (permalink / raw)
  To: loody, linux-pm@vger.kernel.org

On 10/10/2013 01:31 PM, loody wrote:
> hi all:
> Is there any global parameter which can let us know the pm state?
> Such that we can apply different software workaround in our embedded
> system by different power state.

Can you elaborate and give an example ?


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: any global parameter to know system power state
  2013-10-10 12:15   ` Daniel Lezcano
@ 2013-10-10 13:52     ` loody
  2013-10-10 14:35       ` Alan Stern
  0 siblings, 1 reply; 5+ messages in thread
From: loody @ 2013-10-10 13:52 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: linux-pm@vger.kernel.org

hi Daniel:


2013/10/10 Daniel Lezcano <daniel.lezcano@linaro.org>:
> On 10/10/2013 01:31 PM, loody wrote:
>>
>> hi all:
>> Is there any global parameter which can let us know the pm state?
>> Such that we can apply different software workaround in our embedded
>> system by different power state.
>
>
> Can you elaborate and give an example ?
Sure.
I forget to do that to make this question more clear :)


in xhci_resume, we will do xhci_halt usually.
But our embedded system has something wrong and xhci_halt will make it
core dump during resume.

I try to know whether there is any global parameter to let us do the
sw workaround.
(just like below + line)


int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
{
    u32            command, temp = 0;
    struct usb_hcd        *hcd = xhci_to_hcd(xhci);
    struct usb_hcd        *secondary_hcd;
    int            retval = 0;
    ....
    ......
    xhci_dbg(xhci, "Stop HCD\n");
+    if (global_pm_state !=resume){
        xhci_halt(xhci);
+    }
    xhci_reset(xhci);
    spin_unlock_irq(&xhci->lock);
    ......



Appreciate your help,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: any global parameter to know system power state
  2013-10-10 13:52     ` loody
@ 2013-10-10 14:35       ` Alan Stern
  2013-10-10 16:05         ` loody
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Stern @ 2013-10-10 14:35 UTC (permalink / raw)
  To: loody; +Cc: Sarah Sharp, Daniel Lezcano, linux-pm@vger.kernel.org

On matters concerning xHCI, you really should CC: the xHCI maintainer.

On Thu, 10 Oct 2013, loody wrote:

> in xhci_resume, we will do xhci_halt usually.
> But our embedded system has something wrong and xhci_halt will make it
> core dump during resume.
> 
> I try to know whether there is any global parameter to let us do the
> sw workaround.
> (just like below + line)
> 
> 
> int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
> {
>     u32            command, temp = 0;
>     struct usb_hcd        *hcd = xhci_to_hcd(xhci);
>     struct usb_hcd        *secondary_hcd;
>     int            retval = 0;
>     ....
>     ......
>     xhci_dbg(xhci, "Stop HCD\n");
> +    if (global_pm_state !=resume){
>         xhci_halt(xhci);
> +    }
>     xhci_reset(xhci);
>     spin_unlock_irq(&xhci->lock);
>     ......

Wouldn't it be better to test the platform?  Then the xhci_halt() could 
be skipped on your embedded systems but nowhere else.

Alan Stern


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: any global parameter to know system power state
  2013-10-10 14:35       ` Alan Stern
@ 2013-10-10 16:05         ` loody
  0 siblings, 0 replies; 5+ messages in thread
From: loody @ 2013-10-10 16:05 UTC (permalink / raw)
  To: Alan Stern; +Cc: Sarah Sharp, Daniel Lezcano, linux-pm@vger.kernel.org

hi Alan:
Wow!! Suprise!!
you are here  :-)
Does linux hacker need to monitor every topic?

> On matters concerning xHCI, you really should CC: the xHCI maintainer.
Yes, but I thought this our soc issue, and it is under debugging.
So i try not to bother Sarah. :)

>
> On Thu, 10 Oct 2013, loody wrote:
>
>> in xhci_resume, we will do xhci_halt usually.
>> But our embedded system has something wrong and xhci_halt will make it
>> core dump during resume.
>>
>> I try to know whether there is any global parameter to let us do the
>> sw workaround.
>> (just like below + line)
>>
>>
>> int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
>> {
>>     u32            command, temp = 0;
>>     struct usb_hcd        *hcd = xhci_to_hcd(xhci);
>>     struct usb_hcd        *secondary_hcd;
>>     int            retval = 0;
>>     ....
>>     ......
>>     xhci_dbg(xhci, "Stop HCD\n");
>> +    if (global_pm_state !=resume){
>>         xhci_halt(xhci);
>> +    }
>>     xhci_reset(xhci);
>>     spin_unlock_irq(&xhci->lock);
>>     ......
>
> Wouldn't it be better to test the platform?  Then the xhci_halt() could
> be skipped on your embedded systems but nowhere else.

Yes, actually our designer is trying to figure out why "xhci_halt"
make our system core dump.
off cause I can keep my own parameter to record pm_state, but it would
be better if there is already a global one to the same thing.

Nice to see U, and hope one day I have the pleasure to drink beer with you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-10 16:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CANudz+tjdjwZvSRmYxDO67M0LTqjbPK2iZTMPLerZZnBufLixA@mail.gmail.com>
2013-10-10 11:31 ` any global parameter to know system power state loody
2013-10-10 12:15   ` Daniel Lezcano
2013-10-10 13:52     ` loody
2013-10-10 14:35       ` Alan Stern
2013-10-10 16:05         ` loody

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.