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

From: Johan Hovold

Date: Fri Nov 06 2026 - 09:20:46 EST


On Tue, Nov 03, 2026 at 04:51:24PM +0100, Stefano Radaelli wrote:
> 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.

This is a policy decision that should be left for userspace, not
individual drivers. As documented in
Documentation/driver-api/pm/devices.rst:

The initial value in the :file:`power/wakeup` file is "disabled"
for the majority of devices; the major exceptions are power
buttons, keyboards, and Ethernet adapters whose WoL
(wake-on-LAN) feature has been set up with ethtool.

So no, this doesn't look like something we want. You should continue
enabling wakeup from userspace on systems that need it instead.

Note that the "wakeup-source" devicetree attribute also describes
capability, not policy:

Documentation/devicetree/bindings/power/wakeup-source.txt

Johan