linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Tony Lindgren <tony@atomide.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/2] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag
Date: Thu, 3 Dec 2015 18:59:08 +0000	[thread overview]
Message-ID: <566090FC.1020502@arm.com> (raw)
In-Reply-To: <20151203181337.GV23396@atomide.com>



On 03/12/15 18:13, Tony Lindgren wrote:
> * Linus Walleij <linus.walleij@linaro.org> [151201 06:07]:
>> On Fri, Nov 27, 2015 at 6:21 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>>
>>> From: Sudeep Holla <Sudeep.Holla@arm.com>
>>>
>>> The IRQF_NO_SUSPEND flag is used to identify the interrupts that should
>>> be left enabled so as to allow them to work as expected during the
>>> suspend-resume cycle, but doesn't guarantee that it will wake the system
>>> from a suspended state, enable_irq_wake is recommended to be used for
>>> the wakeup.
>>>
>>> This patch removes the use of IRQF_NO_SUSPEND flags replacing it with
>>> irq_set_irq_wake instead.
>>>
>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>> Cc: linux-gpio@vger.kernel.org
>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>>
>> I need Tony's ACK on this as well.
>
> At least on omaps, this controller is always powered and we never want to
> suspend it as it handles wake-up events for all the IO pins. And that
> usecase sounds exactly like what you're describing above.
>

Understood, but I assume this is a generic driver that can be used by
any pinmux.

> I don't quite follow what your suggested alternative for an interrupt
> controller is?
>

Why can't we use enable_irq_wake even for parent/interrupt controller as
they can be considered as parent wakeup irq. I agree the interrupt
controller may not be powered down, but still it's part of wakeup and
the irq core needs to identify that. By just marking IRQF_NO_SUSPEND,
you are saying that you can handle interrupt in the suspend path but not
informing that it's a wakeup interrupt.

With this change, the wakeup handler (including the parent handler) is
called when it's safe as the irq core maintains the state machine.

> At least we need to have the alternative patched in with this chage before
> just removing IRQF_NO_SUSPEND.
>

I have added irq_set_irq_wake(pcs_soc->irq, state) in pcs_irq_set_wake
which ensures it's marked for wakeup.

> The enable_irq_wake is naturally used for the consumer drivers of this
> interrupt controller and actually mostly done automatically now with the
> dev_pm_set_dedicated_wake_irq.
>

Agreed, no doubt on that.

-- 
Regards,
Sudeep

  parent reply	other threads:[~2015-12-03 18:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 17:20 [PATCH 1/2] pinctrl: single: Use a separate lockdep class Sudeep Holla
2015-11-27 17:21 ` [PATCH 2/2] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
2015-12-01 14:06   ` Linus Walleij
2015-12-03 18:13     ` Tony Lindgren
2015-12-03 18:35       ` Grygorii Strashko
2015-12-03 21:37         ` Tony Lindgren
2015-12-04 10:44           ` Grygorii Strashko
2015-12-04 10:54             ` Sudeep Holla
2015-12-04 11:18               ` Grygorii Strashko
2015-12-04 11:21                 ` Sudeep Holla
2015-12-04 15:35             ` Tony Lindgren
2015-12-04 15:59               ` Grygorii Strashko
2015-12-04 16:11                 ` Sudeep Holla
2015-12-04 16:30                   ` Grygorii Strashko
2015-12-04 17:07                     ` Tony Lindgren
2015-12-04 17:09                 ` Tony Lindgren
2015-12-03 18:59       ` Sudeep Holla [this message]
2015-12-03 21:40         ` Tony Lindgren
2015-12-04 15:40           ` Tony Lindgren
2015-12-04 15:44             ` Sudeep Holla
2015-12-04 16:19               ` Grygorii Strashko
2015-12-04 16:26                 ` Sudeep Holla
2015-12-04 17:06                   ` Tony Lindgren
2015-12-04 16:15             ` Sudeep Holla
2015-12-04 17:10               ` Tony Lindgren
2015-12-01 14:06 ` [PATCH 1/2] pinctrl: single: Use a separate lockdep class Linus Walleij
2015-12-01 14:09   ` Sudeep Holla
2015-12-03 18:07     ` Tony Lindgren
2015-12-03 21:46       ` Tony Lindgren

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=566090FC.1020502@arm.com \
    --to=sudeep.holla@arm.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=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).