All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] snvs_pwrkey - code improvements and add report event
@ 2026-06-15  7:52 joy.zou
  2026-06-15  7:52 ` [PATCH v3 1/4] Input: snvs_pwrkey - make use of dev_err_probe() joy.zou
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: joy.zou @ 2026-06-15  7:52 UTC (permalink / raw)
  To: Dmitry Torokhov, Frank Li, Bough Chen, Peng Fan, Jacky Bai, Ye Li
  Cc: Joy Zou, imx, linux-input, linux-kernel, Joy Zou

This patch series improves the snvs_pwrkey driver with better code quality
and add report press event.

The main improvements include:
1. Clean up the code by using local device pointers and dev_err_probe() for
better readability and easier debugging.

2. Fix potential event loss during system suspend by reporting key press events
directly in the interrupt handler.

Signed-off-by: Joy Zou <joy.zou@oss.nxp.com>
---
Changes in v3:
- Add spinlock for pdata->keystate and pdata->suspended per AI review comments.
- Replace hardcode value 1 with local variable keystate in input_report_key()
  under suspended.
- Link to v2: https://lore.kernel.org/r/20260604-pwrkey-cleanup-v2-0-59fa0ddf0d7c@nxp.com

Changes in v2:
- Drop dev_err_probe() change for platform_get_irq() per AI review comments.
- Add new patch #2 replace hardcoding -EINVAL with original error code per
  AI review comments.
- Use dev instead of &pdev->dev for devm_input_allocate_device(), which was
  missed in patch v1 per AI review comments.
- Add a boolean variable suspended and PM callback functions to replace
  the use of the is_suspended field per AI review comments.
- Move event report handle to else branch in suspended state, since the
  pdata->minor_rev == 0 branch has no debounce detection per AI review
  comments.
- Modify patch #3 and #4 commit message.
- Add Reviewed-by tag for patch #1.
- Link to v1: https://lore.kernel.org/r/20260326-pwrkey-cleanup-v1-0-d85d7c0bf275@nxp.com

To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Frank Li <Frank.Li@nxp.com>
To: Bough Chen <haibo.chen@nxp.com>
To: Peng Fan <peng.fan@nxp.com>
To: Jacky Bai <ping.bai@nxp.com>
To: Ye Li <ye.li@nxp.com>
Cc: imx@lists.linux.dev
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Joy Zou (4):
      Input: snvs_pwrkey - make use of dev_err_probe()
      Input: snvs_pwrkey - replace hardcoding -EINVAL with original error code
      Input: snvs_pwrkey - use local device pointer to simple code
      Input: snvs_pwrkey - report press event in interrupt handler

 drivers/input/keyboard/snvs_pwrkey.c | 127 ++++++++++++++++++++++++-----------
 1 file changed, 86 insertions(+), 41 deletions(-)
---
base-commit: f7af91adc230aa99e23330ecf85bc9badd9780ad
change-id: 20260615-b4-pwrkey-a60b2043cd29

Best regards,
--  
Joy Zou <joy.zou@oss.nxp.com>


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

end of thread, other threads:[~2026-06-15 14:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15  7:52 [PATCH v3 0/4] snvs_pwrkey - code improvements and add report event joy.zou
2026-06-15  7:52 ` [PATCH v3 1/4] Input: snvs_pwrkey - make use of dev_err_probe() joy.zou
2026-06-15  7:57   ` sashiko-bot
2026-06-15  7:52 ` [PATCH v3 2/4] Input: snvs_pwrkey - replace hardcoding -EINVAL with original error code joy.zou
2026-06-15  7:58   ` sashiko-bot
2026-06-15 14:38   ` Frank Li
2026-06-15  7:52 ` [PATCH v3 3/4] Input: snvs_pwrkey - use local device pointer to simple code joy.zou
2026-06-15  7:57   ` sashiko-bot
2026-06-15 14:40   ` Frank Li
2026-06-15 14:43   ` Frank Li
2026-06-15  7:52 ` [PATCH v3 4/4] Input: snvs_pwrkey - report press event in interrupt handler joy.zou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.