From: santosh shilimkar <santosh.shilimkar@oracle.com>
To: Tony Lindgren <tony@atomide.com>,
Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Santosh Shilimkar <ssantosh@kernel.org>,
Sekhar Nori <nsekhar@ti.com>,
Linux-OMAP <linux-omap@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Roger Quadros <rogerq@ti.com>
Subject: Re: [PATCH] gpio: omap: fix irq triggering in smart-idle wakeup mode
Date: Mon, 18 Apr 2016 17:01:44 -0700 [thread overview]
Message-ID: <57157568.1080305@oracle.com> (raw)
In-Reply-To: <20160418233602.GW5995@atomide.com>
On 4/18/2016 4:36 PM, Tony Lindgren wrote:
> * Grygorii Strashko <grygorii.strashko@ti.com> [160418 08:59]:
>> On 04/15/2016 09:54 PM, Tony Lindgren wrote:
>>> * santosh shilimkar <santosh.shilimkar@oracle.com> [160415 08:22]:
>>>> On 4/15/2016 2:26 AM, Grygorii Strashko wrote:
>>>>>
>>>>> Santosh, Tony, do you want me to perform any additional actions regarding this patch?
>>>>>
>>>> This patch should be run across family of SOCs to make
>>>> sure wakeup works on all of those if not done already
>>>
>>> Also, I'm not sure if we can just drop this code in question.
>>>
>>> After this patch, what function updates the GPIO wkup_en registers
>>> depending on enable_irq_wake()/disable_irq_wake()?
>>>
>>
>> The main purpose of this patch is to *not* modify GPIO wkup_en registers
>> depending of enable_irq_wake()/disable_irq_wake() :), instead all
>> non wake up IRQs should be masked during suspend.
>
> OK that makes sense.
>
>> The GPIO wkup_en registers should be always in sync with GPIO irq_en when
>> GPIO IP is in smart-idle wakeup mode. And this is done now from
>> omap_gpio_unmask_irq/omap_gpio_mask_irq(). See also [1].
>>
>> In general, it is more or less similar to GIC + wakeupgen:
>> - during normal work (including cpuidle) GIC irq_en and Wakeupgen wkup_en
>> should be in sync always
>> - during suspend - only IRQs, marked as wake up sources, should be left
>> unmasked.
>>
>> Also, I've found old thread [2] where Santosh proposed to use IRQCHIP_MASK_ON_SUSPEND.
>> And it was not possible, at that time, but now IRQCHIP_MASK_ON_SUSPEND can be used :),
>> because OMAP GPIO driver was switched to use generic irq handler instead of chained, so
>> now OMAP GPIO irqs are properly handled by IRQ PM core.
>> [chained irqs (and chained irq handles) are not disabled during suspend/resume and they are
>> not maintained by IRQ PM core as result they can trigger way too early on resume when
>> OMAP GPIO is not ready/powered.]
>
> OK. For my tests this patch does not change anything. I noticed however
> that we still have some additional bug somewhere where GPIO wake up
> events work fine for omap3 PM runtime, but are flakey for suspend.
>
>> I've tested it on: am57x-evm, am437x-idk-evm, omap4-panda
>
> OK thanks! Based on my tests and the above:
>
> Acked-by: Tony Lindgren <tony@atomide.com>
>
If all works then consider my ack as well :-)
next prev parent reply other threads:[~2016-04-19 0:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 10:52 [PATCH] gpio: omap: fix irq triggering in smart-idle wakeup mode Grygorii Strashko
2016-04-12 16:44 ` santosh shilimkar
2016-04-12 18:10 ` Grygorii Strashko
2016-04-13 19:31 ` Tony Lindgren
2016-04-15 8:32 ` Linus Walleij
2016-04-15 9:26 ` Grygorii Strashko
2016-04-15 15:21 ` Tony Lindgren
2016-04-15 15:21 ` santosh shilimkar
2016-04-15 18:54 ` Tony Lindgren
2016-04-18 15:57 ` Grygorii Strashko
2016-04-18 23:36 ` Tony Lindgren
2016-04-19 0:01 ` santosh shilimkar [this message]
2016-04-26 13:58 ` Linus Walleij
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=57157568.1080305@oracle.com \
--to=santosh.shilimkar@oracle.com \
--cc=gnurou@gmail.com \
--cc=grygorii.strashko@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=rogerq@ti.com \
--cc=ssantosh@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).