mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Igor Velkov <iav@iav.lv>
To: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Thomas Gleixner <tglx@kernel.org>, Radu Rendec <radu@rendec.net>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	iav@iav.lv
Subject: Re: [PATCH] irqchip/meson-gpio: Allow the GPIO interrupts to wake the system
Date: Thu, 08 Oct 2026 17:19:54 +0300	[thread overview]
Message-ID: <a12a6d283cd8382311117c6b95bfee23.iav@iav.lv> (raw)
In-Reply-To: <70897195-0ffc-4d80-80d4-e60f87c6101e@linaro.org>

On 08.10.2026 10:36, Neil Armstrong wrote:
> The code sound valid but the this paragraph means nothing, adding or removing
> IRQCHIP_SKIP_SET_WAKE should not change the fact PCF8563 would wake up the ODROID-HC4
> since the BL301 firmware hardcodes which gpio can wakeup.

The test was suspend-to-idle, not mem. The SoC never enters the firmware
suspend there, so BL301 does not pick the wakeup source: the CPUs sit in
cpuidle and any interrupt left enabled in the GIC brings them out.

Whether that wakes the *system* is decided by genirq. suspend_device_irqs()
keeps an interrupt enabled only when irqd_is_wakeup_set(), and that is what
enable_irq_wake() sets. Without the flag enable_irq_wake() fails with
-ENXIO, the interrupt is suspended, and when it fires the flow handler
masks it (irq_can_handle_actions(): irqd_irq_disabled -> IRQS_PENDING,
mask_irq()). The alarm fires once, nothing calls pm_system_irq_wakeup(),
s2idle carries on and the board stays asleep until a power cycle. With the
flag the interrupt is armed, pm_system_irq_wakeup() ends s2idle, and
/sys/power/pm_wakeup_irq shows the alarm. That is the 4/4 against 0/1.

> I guess this flag simply removes an error when setting the gpio as wakeup source
> which means nothing in this platform anyway. So please rephrase.

For mem you are right: the firmware chooses the wakeup sources and this
flag changes nothing there. v2 will say s2idle explicitly and describe the
mechanism above.

Igor

  reply	other threads:[~2026-10-08 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 21:55 Igor Velkov via B4 Relay
2026-10-08  8:36 ` Neil Armstrong
2026-10-08 14:19   ` Igor Velkov [this message]
2026-10-07 21:55 Igor Velkov via B4 Relay

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=a12a6d283cd8382311117c6b95bfee23.iav@iav.lv \
    --to=iav@iav.lv \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=radu@rendec.net \
    --cc=tglx@kernel.org \
    /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

all inboxes | Powered by JetHome®