Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1497418 > unrolled thread
| Started by | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| First post | 2016-10-07 20:00 +0200 |
| Last post | 2016-10-09 19:20 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2016-10-07 20:00 +0200 |
| Subject | Re: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts |
| Message-ID | <spHB8-3PS-11@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | "Bacchewar, Nilesh" <nilesh.bacchewar@intel.com> |
|---|---|
| Date | 2016-10-07 20:20 +0200 |
| Subject | RE: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts |
| Message-ID | <spHUt-4gr-3@gated-at.bofh.it> |
| In reply to | #1497418 |
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
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2016-10-07 21:50 +0200 |
| Message-ID | <spJjA-537-29@gated-at.bofh.it> |
| In reply to | #1497446 |
On Fri, Oct 7, 2016 at 9:17 PM, Bacchewar, Nilesh <nilesh.bacchewar@intel.com> wrote: > Here, Its marking GPIO controller IRQ line as wake capable not GPIO lines. AFAIU this is called per (GPIO) pin which is IRQ enabled. Imagine a case when you have more than one such pin. 1. Set IRQ wake for pin 1 2. Set IRQ wake for pin 2 (assume that is pin under the question) 3. Unset IRQ wake for pin 1 (for some reason) 4. Global pinctrl IRQ wake is unset. Resulting same issue as before. What did I miss above? > > 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 -- With Best Regards, Andy Shevchenko
[toc] | [prev] | [next] | [standalone]
| From | Mika Westerberg <mika.westerberg@linux.intel.com> |
|---|---|
| Date | 2016-10-09 17:10 +0200 |
| Subject | Re: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts |
| Message-ID | <sqnTI-5PK-9@gated-at.bofh.it> |
| In reply to | #1497487 |
On Fri, Oct 07, 2016 at 10:40:42PM +0300, Andy Shevchenko wrote: > On Fri, Oct 7, 2016 at 9:17 PM, Bacchewar, Nilesh > <nilesh.bacchewar@intel.com> wrote: > > Here, Its marking GPIO controller IRQ line as wake capable not GPIO lines. > > AFAIU this is called per (GPIO) pin which is IRQ enabled. > > Imagine a case when you have more than one such pin. > > 1. Set IRQ wake for pin 1 > 2. Set IRQ wake for pin 2 (assume that is pin under the question) > 3. Unset IRQ wake for pin 1 (for some reason) > 4. Global pinctrl IRQ wake is unset. Resulting same issue as before. > > What did I miss above? enable/disable_irq_wake() include reference count.
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2016-10-09 19:20 +0200 |
| Message-ID | <sqpVv-71r-3@gated-at.bofh.it> |
| In reply to | #1497928 |
On Sun, Oct 9, 2016 at 5:59 PM, Mika Westerberg <mika.westerberg@linux.intel.com> wrote: > On Fri, Oct 07, 2016 at 10:40:42PM +0300, Andy Shevchenko wrote: >> On Fri, Oct 7, 2016 at 9:17 PM, Bacchewar, Nilesh >> <nilesh.bacchewar@intel.com> wrote: >> > Here, Its marking GPIO controller IRQ line as wake capable not GPIO lines. >> >> AFAIU this is called per (GPIO) pin which is IRQ enabled. >> >> Imagine a case when you have more than one such pin. >> >> 1. Set IRQ wake for pin 1 >> 2. Set IRQ wake for pin 2 (assume that is pin under the question) >> 3. Unset IRQ wake for pin 1 (for some reason) >> 4. Global pinctrl IRQ wake is unset. Resulting same issue as before. >> >> What did I miss above? > > enable/disable_irq_wake() include reference count. Good to know. Thanks! -- With Best Regards, Andy Shevchenko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web