From: Frank Li <Frank.li@nxp.com>
To: Joy Zou <joy.zou@nxp.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Peng Fan <peng.fan@nxp.com>, Jacky Bai <ping.bai@nxp.com>,
Ye Li <ye.li@nxp.com>,
imx@lists.linux.dev, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] Input: snvs_pwrkey - report press event in interrupt handler
Date: Thu, 26 Mar 2026 15:57:27 -0400 [thread overview]
Message-ID: <acWPp7KHxv9a5Az6@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260326-pwrkey-cleanup-v1-3-d85d7c0bf275@nxp.com>
On Thu, Mar 26, 2026 at 06:39:40PM +0800, Joy Zou wrote:
> On some boards such as i.MX8MQ-EVK, the PCIe driver may take up to
> 200ms to restore the PCIe link during the no_irq resume phase. This
> causes key press events to be lost because the key may be released
> before the timer starts running, as interrupts are disabled during
> this 200ms window.
if irq disable, how imx_snvs_pwrkey_interrupt get run?
Frank
>
> Report key press events directly in interrupt handler to prevent event
> loss during system suspend.
>
> Signed-off-by: Joy Zou <joy.zou@nxp.com>
> ---
> drivers/input/keyboard/snvs_pwrkey.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c
> index bab3ab57fdac77256be75a080773ea99372ec9c7..b557c1618d7369e872c6ce708a7b3017264ee385 100644
> --- a/drivers/input/keyboard/snvs_pwrkey.c
> +++ b/drivers/input/keyboard/snvs_pwrkey.c
> @@ -78,6 +78,16 @@ static irqreturn_t imx_snvs_pwrkey_interrupt(int irq, void *dev_id)
>
> pm_wakeup_event(input->dev.parent, 0);
>
> + /*
> + * Report key press events directly in interrupt handler to prevent event
> + * loss during system suspend.
> + */
> + if (pdev->dev.power.is_suspended) {
> + pdata->keystate = 1;
> + input_report_key(input, pdata->keycode, 1);
> + input_sync(input);
> + }
> +
> regmap_read(pdata->snvs, SNVS_LPSR_REG, &lp_status);
> if (lp_status & SNVS_LPSR_SPO) {
> if (pdata->minor_rev == 0) {
>
> --
> 2.37.1
>
next prev parent reply other threads:[~2026-03-26 19:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 10:39 [PATCH 0/3] snvs_pwrkey - code improvements and add report event Joy Zou
2026-03-26 10:39 ` [PATCH 1/3] Input: snvs_pwrkey - make use of dev_err_probe() Joy Zou
2026-03-26 19:51 ` Frank Li
2026-03-26 10:39 ` [PATCH 2/3] Input: snvs_pwrkey - use local device pointer avoid reference platform_device pointer every time Joy Zou
2026-03-26 19:55 ` Frank Li
2026-03-26 10:39 ` [PATCH 3/3] Input: snvs_pwrkey - report press event in interrupt handler Joy Zou
2026-03-26 19:57 ` Frank Li [this message]
2026-03-31 10:46 ` Joy Zou
2026-03-31 14:11 ` Frank Li
2026-04-01 4:50 ` [PATCH 0/3] snvs_pwrkey - code improvements and add report event Dmitry Torokhov
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=acWPp7KHxv9a5Az6@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=dmitry.torokhov@gmail.com \
--cc=imx@lists.linux.dev \
--cc=joy.zou@nxp.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=ye.li@nxp.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