Skip to content

serial: Support driver-selected TTY wakeup defaults

Stefano Radaelli linux-devicetree linux-pm linux-serial lkml sashiko-reviews 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: serial: fsl-lpuart: Allow wakeup-sourceDocumentation/devicetree/bindings/serial/fsl-lpuart.yaml+2 -01 reply
2/3serial: core: Allow drivers to enable TTY wakeup at registrationdrivers/tty/serial/serial_core.c include/linux/serial_core.h+9 -00 replies
3/3serial: fsl_lpuart: Enable TTY wakeup for wakeup-source portsdrivers/tty/serial/fsl_lpuart.c+1 -01 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchKrzysztof Kozlowski
1/3A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/3] serial: Support driver-selected TTY wakeup defaults

The initial goal was to enable TTY wakeup by default on NXP LPUART ports marked with wakeup-source, without requiring a userspace write. Instead of keeping this entirely within fsl_lpuart, this series introduces a common serial core mechanism that other UART drivers can also adopt.

The new tty_wakeup_default field in struct uart_port lets a driver request wakeup to be enabled when its TTY device is registered. Each driver decides whether to use it. This series adds wakeup-source to the LPUART binding and makes fsl_lpuart the first user, setting the field from that property. Other drivers retain their existing behavior, userspace can still change power/wakeup, and serdev wakeup policy is unchanged.

Tested on a Variscite VAR-SOM-MX93 with a Symphony carrier board using LPUART1 (ttyLP0) as the console: with wakeup-source present, power/wakeup was enabled after boot, and the board resumed from deep suspend when Enter was pressed on the serial console.

Stefano Radaelli (3):
dt-bindings: serial: fsl-lpuart: Allow wakeup-source
serial: core: Allow drivers to enable TTY wakeup at registration
serial: fsl_lpuart: Enable TTY wakeup for wakeup-source ports

 Documentation/devicetree/bindings/serial/fsl-lpuart.yaml | 2 ++
 drivers/tty/serial/fsl_lpuart.c                          | 1 +
 drivers/tty/serial/serial_core.c                         | 8 ++++++++
 include/linux/serial_core.h                              | 1 +
 4 files changed, 12 insertions(+)

base-commit: 2637bdec0535a2044cd830eba9a79363651d9043

Signature · 1 line
2.47.3