Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1497446

RE: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts

From "Bacchewar, Nilesh" <nilesh.bacchewar@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts
Date 2016-10-07 20:20 +0200
Message-ID <spHUt-4gr-3@gated-at.bofh.it> (permalink)
References <sjYOl-6SG-15@gated-at.bofh.it> <spHB8-3PS-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Here, Its marking  GPIO controller IRQ line as wake capable not GPIO lines.

Regards,
Nilesh

-----Original Message-----
From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com] 
Sent: Friday, October 7, 2016 10:59 AM
To: Bacchewar, Nilesh <nilesh.bacchewar@intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>; Krogerus, Heikki <heikki.krogerus@linux.intel.com>; Linus Walleij <linus.walleij@linaro.org>; linux-gpio@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts

On Thu, Sep 22, 2016 at 2:03 AM, Nilesh Bacchewar <nilesh.bacchewar@intel.com> wrote:
> On some Intel BXT platform, wake-up from suspend-to-idle on pressing 
> power-button is not working. Its noticed that gpio-keys driver marking 
> the second level IRQ/power-button as wake capable but Intel pintctrl 
> driver is missing to mark GPIO chip/controller IRQ which first level 
> IRQ as wake cable if its GPIO pin IRQ is wakeble. So, though the first 
> level IRQ gets generated on power-button press, since it is not marked 
> as wake capable resume/wake-up flow is not happening.
> Intel pintctrl/GPIO driver need to mark GPIO chip/controller IRQ 
> (first level IRQ) as wake capable iff GPIO pin's IRQ (second level 
> IRQ) is marked as wake cable.

>         if (on)
> -               gpe_en |= BIT(gpp_offset);
> +               enable_irq_wake(pctrl->irq);
>         else
> -               gpe_en &= ~BIT(gpp_offset);
> -       writel(gpe_en, community->regs + GPI_GPE_EN + gpp * 4);
> -
> -       raw_spin_unlock_irqrestore(&pctrl->lock, flags);
> +               disable_irq_wake(pctrl->irq);

Shouldn't be refcounting here or I missed something?
What I think of is 2+ GPIO lines marked as wake capable IRQ sources and one of them is disabled earlier by some reason.

--
With Best Regards,
Andy Shevchenko

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-10-07 20:00 +0200
  RE: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup  interrupts "Bacchewar, Nilesh" <nilesh.bacchewar@intel.com> - 2016-10-07 20:20 +0200
    Re: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-10-07 21:50 +0200
      Re: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup  interrupts Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-10-09 17:10 +0200
        Re: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-10-09 19:20 +0200

csiph-web