public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: Grazvydas Ignotas <notasas@gmail.com>
Cc: linux-omap@vger.kernel.org, Paul Walmsley <paul@pwsan.com>
Subject: Re: GPIO debounce problems on 3.2
Date: Mon, 30 Jan 2012 15:18:49 -0800	[thread overview]
Message-ID: <87obtkpyna.fsf@ti.com> (raw)
In-Reply-To: <CANOLnOM-kaHv=Dm2-6xowK4Z_BJuRopj-25M1HeyJsiYgXp7tA@mail.gmail.com> (Grazvydas Ignotas's message of "Tue, 31 Jan 2012 00:07:59 +0200")

Grazvydas Ignotas <notasas@gmail.com> writes:

> On Mon, Jan 30, 2012 at 9:36 PM, Kevin Hilman <khilman@ti.com> wrote:
>> Grazvydas Ignotas <notasas@gmail.com> writes:
>>
>>> Hi,
>>>
>>> On 3.2 (I think some earlier versions too), with CONFIG_CPU_IDLE
>>> enabled GPIO based buttons are not working properly on OMAP3 pandora,
>>> button presses are almost never registered. The buttons are connected
>>> GPIO bank4 and have hardware debounce feature enabled.
>>>
>>> Doing either of the following solves (or hides) the problem:
>>> - disabling CPU_IDLE in kernel config
>>> - disabling debounce for the buttons
>>> - running a program spinning a loop on the CPU
>>>
>>> From what I can see in the code debounce clock is disabled when
>>> entering idle, can those GPIOs work without debounce clock?
>>
>> Yes, the clock is only for the debounce feature, but the GPIOs are
>> capable of wakeups and interrupts with the debounce clock disabled.
>
> Hmm but it doesn't work here (OMAP3530 ES2.1), /proc/interrupts
> doesn't increase when I hit buttons unless something else is happening
> at the same time. I wonder if I'm missing something here, does it all
> work for you with debounce on? 

Yes.  

Specifically, I tested on a n900 which has several GPIOs in the board
file (board-rx51.c) with debounce enabled.

When I push the button (or slide the switch in this case), I see
/proc/interrupts incrementing on an idle system with CPUidle enabled.

The same GPIOs can also bring the system out of suspend (debounce clocks
are disabled on suspend also.)

Kevin



  reply	other threads:[~2012-01-30 23:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 22:57 GPIO debounce problems on 3.2 Grazvydas Ignotas
2012-01-30 19:36 ` Kevin Hilman
2012-01-30 22:07   ` Grazvydas Ignotas
2012-01-30 23:18     ` Kevin Hilman [this message]
2012-01-30 23:34       ` Paul Walmsley
2012-01-31  0:22         ` Kevin Hilman
2012-01-31  1:00           ` Grazvydas Ignotas
2012-01-31  0:56         ` Grazvydas Ignotas
2012-01-31  1:48           ` Paul Walmsley
2012-01-31 11:39             ` Grazvydas Ignotas
2012-01-31 21:40               ` Grazvydas Ignotas
2012-02-01  6:02                 ` Paul Walmsley
2012-02-01  6:06                   ` Paul Walmsley
2012-02-01 11:46                     ` Grazvydas Ignotas
2012-02-01 15:30                       ` Kevin Hilman
2012-02-01 22:33                         ` Grazvydas Ignotas
2012-02-01 18:41                       ` Paul Walmsley
2012-05-04 21:17                         ` Grazvydas Ignotas
2012-02-01  5:47               ` Paul Walmsley
2012-02-01  6:21                 ` NeilBrown
2012-02-01  6:58                   ` Paul Walmsley
2012-01-31  1:49           ` Paul Walmsley
2012-01-31  6:13         ` Paul Walmsley

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=87obtkpyna.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=notasas@gmail.com \
    --cc=paul@pwsan.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