Thread (4 messages) 4 messages, 2 authors, 6d ago

[PATCH v4 0/2] Input: gpio-keys - support wakeup pinctrl state

flat view
COOLING6d

From: Kendall Willis <hidden>
Date: 2026-10-05 20:47:59
Also in: linux-devicetree, lkml

Revision v4 of 4 in this series.

Revisions (4)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 current
Add 'wakeup' pinctrl state to support separate pin wakeup
configurations for GPIO. Upon suspend the 'wakeup' pinctrl state is
chosen if it exists. On resume the 'default' pinctrl state is selected.
The 'wakeup' pinctrl state allows wakeup from low-power states if a
specific pin configuration is needed.

On TI K3 AM62 family of devices, the GPIO controller is turned off in
suspend to RAM states, so no interrupt can be received by the
controller. This prevents system wakeup from low-power states.
Alternatively, the pins can wakeup the system if a wakeup flag is set on
the pin by using pinctrl.

A corresponding device tree patch using the 'wakeup' pinctrl state can
be found under "arm64: dts: ti: k3-am62l3-evm: add wakeup-source for GPIO
button" [1].

Tested GPIO wakeup from suspend on AM62L EVM and AM62P EVM.

[1] https://lore.kernel.org/all/20260912-upstream-gpio-wakeup-dts-v1-1-2057d76c63aa@ti.com/ (local)

Signed-off-by: Kendall Willis <redacted>
---
Changes in v4:
- Propagate all errors but -ENODEV from devm_pinctrl_get() in probe().
- Link to v3: https://lore.kernel.org/r/20261001-upstream-gpio-wakeup-v3-0-6f3bcde367a3@ti.com (local)

Changes in v3:
- Propagate -EPROBE_DEFER from devm_pinctrl_get() in probe().
- Link to v2: https://lore.kernel.org/r/20260925-upstream-gpio-wakeup-v2-0-6c5533356246@ti.com (local)

Changes in v2:
- Update gpio-keys dt bindings commit message for better explanation of
  wakeup state.
- Fix error pathways for if switching to the "wakeup" pinctrl state
  fails.
- Link to v1: https://lore.kernel.org/r/20260912-upstream-gpio-wakeup-v1-0-f0e12484b836@ti.com (local)

---
Kendall Willis (2):
      dt-bindings: input: gpio-keys: add pinctrl states
      Input: gpio-keys - support wakeup pinctrl state on suspend

 .../devicetree/bindings/input/gpio-keys.yaml       | 16 +++++++++++++
 drivers/input/keyboard/gpio_keys.c                 | 26 ++++++++++++++++++++++
 2 files changed, 42 insertions(+)
---
base-commit: 93f51579e7df248780214094418f205253383cc5
change-id: 20260904-upstream-gpio-wakeup-52a54080c948

Best regards,
-- 
Kendall Willis [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help