From: Kevin Hilman <khilman@deeprootsystems.com>
To: Ranjith Lohithakshan <ranjithl@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"tony@atomide.com" <tony@atomide.com>
Subject: Re: [PATCH] OMAP3EVM: Update pad configuration for wakeup enabled pads
Date: Thu, 29 Apr 2010 07:11:02 -0700 [thread overview]
Message-ID: <87wrvq5oy1.fsf@deeprootsystems.com> (raw)
In-Reply-To: <4BD96998.9090902@ti.com> (Ranjith Lohithakshan's message of "Thu\, 29 Apr 2010 16\:42\:24 +0530")
Ranjith Lohithakshan <ranjithl@ti.com> writes:
> On Wed, 28-Apr-10 11:53 PM +0530, Kevin Hilman wrote:
>> Ranjith Lohithakshan <ranjithl@ti.com> writes:
>>
>>> Kevin,
>>>
>>> On Tue, 27-Apr-10 8:46 PM +0530, Kevin Hilman wrote:
>>>> Ranjith Lohithakshan <ranjithl@ti.com> writes:
>>>>
>>>>> OMAP3530 TRM section 7.4.4.4.2 requires OFFOUTENABLE to be set (active low)
>>>>> if wakeup capabilities are enabled on a pad. During OFF mode testing
>>>>> on OMAP3530 EVM, it was observed that the device was not residing in
>>>>> the OFF state. The device enters into the OFF state and immediately exits
>>>>> from that state as if an IO wakeup event has occured. The issue was traced
>>>>> down to the pad configuration of wkaeup enabled pad's.
>>>> Nice.
>>>>
>>>>> Also, the pad configuration is included only if the respective drivers are
>>>>> enabled in the defconfig.
>>>> Hmm, do you really want this? If you don't have the driver enabled,
>>>> you have to rely on the bootloader settings of these pads which may
>>>> also be wrong and trigger an IO wakeup as well.
>>> The thought process was that, for example, if keypad is not enabled
>>> in a system configuration you probably don't want to see a wakeup
>>> occurring if someone presses a key stroke. I understand the concern
>>> that you have raised regarding bootloader mis-configurations. My
>>> impression was that the bootloaders typically set the mux modes and
>>> pull up's/downs and dont really program or enable the wakeup
>>> capability. But we cannot depend on that thumb rule.
>>
>> Unfortunately, Bootloaders don't "typically" do anything. They are
>> routinely hacked/patched and cannot be trusted at all.
>>
>>> What is your recommendation?
>>
>> First, I suggest you fix the OFFOUTENABLE bug in a single patch
>> without introducing the #ifdefs. Then, address the enable/disable of
>> the wakeups in a separate patch.
>
> I will do that.
>
>> Next, ideally wakeups should not be configured a this level of board
>> code. There are APIs for that: enable_irq_wake()/disable_irq_wake()
>>
>> For GPIOs (like the touchscreen), you really need to enable wakeups
>> using existing APIs, either in the driver or in board init code and be
>> sure there is an interrupt handler. Please see the 'Known Problems'
>> section of the OMAP PM wiki[2] where it talks about GPIO wakeups.
>> Below[2] is an test patch I've used.
>
> I have pushed a patch on ads7846 to linux-input some time ago adding
> wakeup support.
>
> fdba2bb : Input: ads7846 - add wakeup support
>
> There is now a wakeup flag added to the ads7846 platform data which can
> enabled at the board level. Once this is set , the driver will do an
> enable_irq_wake. The patch is now accepted and in mainline. I will
> remove the wakeup mux configuration from the board file and instead will
> just set the wakeup flag in the ads7846 platform data.
Brilliant! you're several steps ahead of me. Would you mind
submitting a patch to l-o to enable that for SDP and omap3evm so I
can drop my suggested patch?
> The keypad uses a pin in the non-gpio mode. Is enable_irq_wake supported
> for non-gpio mode?
Not currently, as enable_irq_wake() ends up calling into the
irq_chip's set_wake() method. This then calls into the OMAP GPIO
layer as plat-omap/gpio.c:gpio_wake_enable()
For now, the keypad could just use the mux API at runtime like SDP does
to enable wakeups when needed.
Kevin
next prev parent reply other threads:[~2010-04-30 18:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 11:56 [PATCH] OMAP3EVM: Update pad configuration for wakeup enabled pads Ranjith Lohithakshan
2010-04-27 15:16 ` Kevin Hilman
2010-04-28 9:26 ` Ranjith Lohithakshan
2010-04-28 18:23 ` Kevin Hilman
2010-04-29 11:12 ` Ranjith Lohithakshan
2010-04-29 14:11 ` Kevin Hilman [this message]
2010-04-30 10:07 ` Ranjith Lohithakshan
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=87wrvq5oy1.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=ranjithl@ti.com \
--cc=tony@atomide.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