All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Omair M. Abdullah" <omair.m.abdullah@intel.com>
Cc: Ramesh Babu <ramesh.babu@linux.intel.com>,
	alsa-devel@alsa-project.org, vinod.koul@linux.intel.com,
	vaibhav.agarwal@intel.com, lgirdwood@gmail.com,
	Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com>
Subject: Re: [PATCH] ASoC: Jack: add configurable option for irq_flag
Date: Fri, 15 Feb 2013 12:17:27 +0000	[thread overview]
Message-ID: <20130215121727.GD22283@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20130215071000.GA23031@oma-dev>


[-- Attachment #1.1: Type: text/plain, Size: 1041 bytes --]

On Fri, Feb 15, 2013 at 12:40:00PM +0530, Omair M. Abdullah wrote:

> This patch is mainly to handle GPIOs where there is some toggling of the GPIO
> lines due to the switch bouncing, and the debounce time cannot be increased
> further due to other constraints. In such cases, providing the specific
> edge on which to trigger the interrupt helps increase the robustness.

>      ___   _                _   _________
> e.g.    |_| |______________| |_|

> insert followed by removal, where we want to trigger on the falling edge in both
> cases.

This doesn't make much sense to me, it's a *very* non-obvious change and
it doesn't reflect what's actually happening well.  If you happen to be
lucky and get no bounce it'll fail.  If it's working on your system
there is a fair element of luck in there.

It sounds like all you're looking for here is a better debounce
algorithm, for example one that delays for a bit then starts polling the
GPIO state at a higher rate and declares a result when the GPIO state
doesn't change for a few polls.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2013-02-15 12:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12  5:37 [PATCH] ASoC: Jack: add configurable option for irq_flag Omair Mohammed Abdullah
2013-02-12 11:47 ` Mark Brown
2013-02-13  5:39   ` Ramesh Babu
2013-02-13 13:19     ` Mark Brown
2013-02-15  7:10       ` Omair M. Abdullah
2013-02-15 12:17         ` Mark Brown [this message]
2013-02-17  6:37           ` Omair M. Abdullah
2013-02-17 18:11             ` Mark Brown
2013-02-18 12:55               ` Omair M. Abdullah
2013-02-18 13:29                 ` Mark Brown

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=20130215121727.GD22283@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lgirdwood@gmail.com \
    --cc=omair.m.abdullah@intel.com \
    --cc=omair.m.abdullah@linux.intel.com \
    --cc=ramesh.babu@linux.intel.com \
    --cc=vaibhav.agarwal@intel.com \
    --cc=vinod.koul@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.