Re: [linux-pm] suspend blockers & Android integration

From: Matthew Garrett
Date: Sun Jun 06 2010 - 13:48:25 EST


On Sun, Jun 06, 2010 at 07:37:59PM +0200, Vitaly Wool wrote:
> 2010/6/6 Matthew Garrett <mjg59@xxxxxxxxxxxxx>:
> > On Sun, Jun 06, 2010 at 07:21:49PM +0200, Vitaly Wool wrote:
> >> 2010/6/6 Matthew Garrett <mjg59@xxxxxxxxxxxxx>:
> >>
> >> > Suspend blocks prevent system suspend, not any per-device suspend.
> >>
> >> Can you suspend a device which is holding a wake lock?
> >
> > Yes. Suspend blocks are orthogonal to runtime PM.
>
> That's nice, but that means that it can hold the wake lock
> indefinitely. Brilliant design, I'd say.

Putting a device in a low power state doesn't mean you can't run code in
the driver. If a device generates an event and that event gets handled
by the driver, the driver can take a suspend block and then release it
when userspace reads the event. It's perfectly valid for the device to
go into a low power state in the meantime. When I say that these things
are orthogonal, I really do mean it.

--
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/