From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Suresh Rajashekara <suresh.raj+linuxomap@gmail.com>
Cc: linux-omap@vger.kernel.org, linux-pm@lists.linux-foundation.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [linux-pm] wait_for_completion_interruptible does not wait !!
Date: Mon, 28 Jun 2010 13:28:18 +0100 [thread overview]
Message-ID: <20100628122817.GA27811@sirena.org.uk> (raw)
In-Reply-To: <AANLkTikPOcNZk5ISX2WDHSmsPDw_a5_3Ic3owAbO4o0y@mail.gmail.com>
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.
prev parent reply other threads:[~2010-06-28 12:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-20 6:52 Suresh Rajashekara
2010-06-20 7:23 ` Jiri Slaby
2010-06-20 15:52 ` [linux-pm] " Alan Stern
2010-06-27 4:08 ` Suresh Rajashekara
2010-06-28 12:28 ` Mark Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100628122817.GA27811@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=suresh.raj+linuxomap@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome