2008-03-21 19:29:20

by Kristoffer Ericson

[permalink] [raw]
Subject: Proper way to invoke suspend?

Rafael,

Been looking around for examples, but obviously something I don't understand.
Currently I set apm_queue_event(APM_USER_SUSPEND) inside the power button interrupt, this does nothing.

However if I cat the state, it goes into suspend. Resume fails but thats another question.

Best Wishes
--
Kristoffer Ericson <[email protected]>


2008-03-21 21:05:50

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: Proper way to invoke suspend?

On Saturday, 22 of March 2008, Kristoffer Ericson wrote:
> Rafael,

Hi,

> Been looking around for examples, but obviously something I don't understand.
> Currently I set apm_queue_event(APM_USER_SUSPEND) inside the power button interrupt, this does nothing.
>
> However if I cat the state, it goes into suspend. Resume fails but thats another question.

Well, I have a little experience with APM. If you told me some more details
about what you're after, that would be helpful.

Thanks,
Rafael

2008-03-22 15:17:24

by Pavel Machek

[permalink] [raw]
Subject: Re: Proper way to invoke suspend?

Hi!

> Been looking around for examples, but obviously something I don't understand.
> Currently I set apm_queue_event(APM_USER_SUSPEND) inside the power button interrupt, this does nothing.
>
> However if I cat the state, it goes into suspend. Resume fails but thats another question.

I'd prefer not using apm_queue_event in new code... There are some
routines in kernel/power/main.c you should be calling...

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html