public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Input: gpio-keys - Detect long press events in sleep mode
@ 2025-05-06  5:58 Hua Li
  2025-05-12  7:57 ` lihua -
  0 siblings, 1 reply; 5+ messages in thread
From: Hua Li @ 2025-05-06  5:58 UTC (permalink / raw)
  To: dmitry.torokhov, hdegoede, javier.carrasco.cruz, zack.rusin,
	namcao, andriy.shevchenko, tglx
  Cc: linux-input, linux-kernel, Hua Li

Previously, long pressing the gpio key could only detect short press
events and could not report long press events in sleep mode, we need
to recognize long press events in sleep mode and fix this issue.

Signed-off-by: Hua Li <lihua@huaqin.corp-partner.google.com>
---
 drivers/input/keyboard/gpio_keys.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 5c39a217b94c..b546f38ecf8f 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -426,6 +426,8 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id)
 			 * handler to run.
 			 */
 			input_report_key(bdata->input, button->code, 1);
+			input_sync(bdata->input);
+			return IRQ_HANDLED;
 		}
 	}
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-15 19:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-06  5:58 [PATCH] Input: gpio-keys - Detect long press events in sleep mode Hua Li
2025-05-12  7:57 ` lihua -
2025-05-12  8:50   ` Andy Shevchenko
2025-05-15 18:57     ` Dmitry Torokhov
2025-05-15 19:01       ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox