From: Kevin Hilman <khilman@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: Grazvydas Ignotas <notasas@gmail.com>, linux-omap@vger.kernel.org
Subject: Re: GPIO debounce problems on 3.2
Date: Mon, 30 Jan 2012 16:22:02 -0800 [thread overview]
Message-ID: <871uqgpvpx.fsf@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1201301628440.17726@utopia.booyaka.com> (Paul Walmsley's message of "Mon, 30 Jan 2012 16:34:12 -0700 (MST)")
Paul Walmsley <paul@pwsan.com> writes:
> On Mon, 30 Jan 2012, Kevin Hilman wrote:
>
>> 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:
>> >>
>> >>> 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.)
>
> That's probably I/O ring/pad wakeups happening there, not GPIO wakeups.
> Gražvydas, you are referring to the case where the CORE powerdomain is on,
> but the GPIO IP block is idle?
Right good point.
If CORE is powerdomain is staying on, you might also have a look at the
"GPIO module-level wakeups not always working" item in the "Known
problems" section of the OMAP PM wiki:
http://elinux.org/OMAP_Power_Management#Known_Problems
It might be the case that haven't done a request_irq() +
enable_irq_wake() for those GPIOs.
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-01-31 0:22 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
2012-01-30 23:34 ` Paul Walmsley
2012-01-31 0:22 ` Kevin Hilman [this message]
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=871uqgpvpx.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