[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 5 May 2010 17:12:00 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: mark gross <mgross@...ux.intel.com>
cc: markgross@...gnar.org, Len Brown <len.brown@...el.com>,
<linux-doc@...r.kernel.org>,
Kernel development list <linux-kernel@...r.kernel.org>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>,
Wu Fengguang <fengguang.wu@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api.
On Wed, 5 May 2010, mark gross wrote:
> > > True, you need an ack back from user mode for when its ok to allow
> > > suspend to happen. This ack is device specific and needs to be custom
> > > built per product to its wake up sources.
> >
> > No and no. Nothing special is needed. All userspace needs to do is
> > remove the condition that led to the blocker being enabled initially --
> > which is exactly what userspace would do normally anyway.
>
> Oh, like tell the modem that user mode has handled the ring event and
> its ok to un-block?
No, that's not how it works. It would go like this:
The modem IRQ handler queues its event to the input subsystem.
As it does so the input subsystem enables a suspend blocker,
causing the system to stay awake after the IRQ is done.
The user program enables its own suspend blocker before reading
the input queue. When the queue is empty, the input subsystem
releases its suspend blocker.
When the user program finishes processing the event, it
releases its suspend blocker. Now the system can go back to
sleep.
At no point does the user program have to communicate anything to the
modem driver, and at no point does it have to do anything out of the
ordinary except to enable and disable a suspend blocker.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists