[PATCH 0/2] pps-gpio: restore pin mux on unbind and shutdown
From: Eliav Farber
Date: Wed Sep 16 2026 - 09:58:51 EST
Some boards route the PPS input GPIO through a pin controller and mux the
pins to a different function when the pps-gpio driver is not active.
The driver core already selects the "default" pinctrl state before probe,
so the pins can be muxed for GPIO/PPS use while the driver is bound without
any driver change. Nothing, however, hands the pins back when the driver
is unbound or the system is shut down (for example before kexec), leaving
them stuck in the GPIO mux for the next kernel.
This series lets pps-gpio select an optional "idle" pinctrl state in
remove() and shutdown(), so a board can describe the alternate mux there
and have it restored. It is a no-op for boards that do not describe an
"idle" state, and depends on CONFIG_PM (which performs the idle-state
lookup).
Patch 1 documents the optional "default"/"idle" pinctrl-names in the
binding; patch 2 implements the driver side.
Tested on an AL11 K2V6 JRD10 board: binding/unbinding each pps-gpio device
toggles the corresponding PBS pin-mux register between the GPIO function
and the alternate ec_ptp_trigger_in function as expected, and re-binding
restores the GPIO function via the core-applied "default" state.
Eliav Farber (2):
dt-bindings: pps: pps-gpio: document optional idle pinctrl state
pps: clients: gpio: release pins to idle state on remove and shutdown
.../devicetree/bindings/pps/pps-gpio.yaml | 15 ++++++++++++++-
drivers/pps/clients/pps-gpio.c | 19 +++++++++++++++++++
2 files changed, 33 insertions(+), 1 deletion(-)
--
2.47.3