All of lore.kernel.org
 help / color / mirror / Atom feed
* Sequence of suspend/resume calls
@ 2016-07-19  1:34 Ryan
  2016-07-19  8:12 ` Zhaoyang Huang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ryan @ 2016-07-19  1:34 UTC (permalink / raw)
  To: linux-pm

Hello,


Is it possible for the resume function of a particular driver to be
called before resume function of others are being called?

Suppose, I have a driver - example_suspend, example_resume - Is it
possible for example_suspend to be called last
and example_resume to be called first thing as soon as cpu is woken up?

If so, how can i do that?

Thanks,
ryan

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

* Re: Sequence of suspend/resume calls
  2016-07-19  1:34 Sequence of suspend/resume calls Ryan
@ 2016-07-19  8:12 ` Zhaoyang Huang
  2016-07-19 11:57 ` Chenhui Zhao
  2016-07-19 23:54 ` Lukas Wunner
  2 siblings, 0 replies; 4+ messages in thread
From: Zhaoyang Huang @ 2016-07-19  8:12 UTC (permalink / raw)
  To: Ryan; +Cc: linux-pm

platform devices are suspended according to the sequences on the chain
list. you can try to xxx_get_device which you want to suspend first in
your probe function and return EPROBE_DEFER if xxx_get_device failed.

On 19 July 2016 at 09:34, Ryan <ryanphilips19@googlemail.com> wrote:
> Hello,
>
>
> Is it possible for the resume function of a particular driver to be
> called before resume function of others are being called?
>
> Suppose, I have a driver - example_suspend, example_resume - Is it
> possible for example_suspend to be called last
> and example_resume to be called first thing as soon as cpu is woken up?
>
> If so, how can i do that?
>
> Thanks,
> ryan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Sequence of suspend/resume calls
  2016-07-19  1:34 Sequence of suspend/resume calls Ryan
  2016-07-19  8:12 ` Zhaoyang Huang
@ 2016-07-19 11:57 ` Chenhui Zhao
  2016-07-19 23:54 ` Lukas Wunner
  2 siblings, 0 replies; 4+ messages in thread
From: Chenhui Zhao @ 2016-07-19 11:57 UTC (permalink / raw)
  To: Ryan; +Cc: linux-pm

I don't know your case in detail. However, you may try to register a
syscore ops.
Please refer to drivers/base/syscore.c.

These callbacks will run when suspend_enter() calls syscore_suspend() and
syscore_resume() in kernel/power/suspend.c.

Chenhui
Thanks

On Tue, Jul 19, 2016 at 9:34 AM, Ryan <ryanphilips19@googlemail.com> wrote:
>
> Hello,
>
>
> Is it possible for the resume function of a particular driver to be
> called before resume function of others are being called?
>
> Suppose, I have a driver - example_suspend, example_resume - Is it
> possible for example_suspend to be called last
> and example_resume to be called first thing as soon as cpu is woken up?
>
> If so, how can i do that?
>
> Thanks,
> ryan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Sequence of suspend/resume calls
  2016-07-19  1:34 Sequence of suspend/resume calls Ryan
  2016-07-19  8:12 ` Zhaoyang Huang
  2016-07-19 11:57 ` Chenhui Zhao
@ 2016-07-19 23:54 ` Lukas Wunner
  2 siblings, 0 replies; 4+ messages in thread
From: Lukas Wunner @ 2016-07-19 23:54 UTC (permalink / raw)
  To: Ryan; +Cc: linux-pm

On Mon, Jul 18, 2016 at 06:34:10PM -0700, Ryan wrote:
> Is it possible for the resume function of a particular driver to be
> called before resume function of others are being called?

device_pm_wait_for_dev()

Best regards,

Lukas

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

end of thread, other threads:[~2016-07-19 23:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19  1:34 Sequence of suspend/resume calls Ryan
2016-07-19  8:12 ` Zhaoyang Huang
2016-07-19 11:57 ` Chenhui Zhao
2016-07-19 23:54 ` Lukas Wunner

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.