[PATCH] fix-jack-debounce.patch

andrzej zaborowski balrogg at gmail.com
Fri Apr 11 12:49:54 CEST 2008


On 11/04/2008, Andy Green <andy at openmoko.com> wrote:
> Headphone jack detection is bouncy, it can trigger multiple interrupts
>  on insertion or removal.  This patch adds a workqueue that waits out the
>  interrupt spew in 100ms units, and if it sees no more interrupts for 100ms
>  only then samples and reports the jack state.

If there are no spurious changes on the pin, only bouncing after a
legal change, then it's fine to report the event on the first change
and wait only if a previous state change was less than 100ms ago. (Not
that it matter so much for jack detection)


More information about the openmoko-kernel mailing list