Re: [linux-pm] wait_for_completion_interruptible does not wait !!
From: Mark Brown
Date: Mon Jun 28 2010 - 08:28:35 EST
On Sat, Jun 19, 2010 at 11:52:10PM -0700, Suresh Rajashekara wrote:
> I have an application which calls the ioctl of the codec driver to
> know the status of the headset.
> The ioctl waits on a completion variable (using
> wait_for_completion_interruptible).
There is standard support for headset status reporting via the input
layer in mainline, I would recommend implementing your headset detection
in terms of this.
> The problem starts when we suspend the OMAP. The moment we suspend,
> the wait_for_completion_interruptible is interrupted and the ioctl
> returns. Application ends up thinking that the headset was either
> removed/inserted. Our system does an aggressive sleep (wakes up every
> 500 ms and sleeps again) and hence the application gets the event of
> headset every 500 ms.
The input layer does not have this problem.
--
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/