mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] pps-gpio: restore pin mux on unbind and shutdown
@ 2026-09-16 13:47 Eliav Farber
  2026-09-16 13:47 ` [PATCH 1/2] dt-bindings: pps: pps-gpio: document optional idle pinctrl state Eliav Farber
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Eliav Farber @ 2026-09-16 13:47 UTC (permalink / raw)
  To: Rodolfo Giometti, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Fabio Estevam, Andrew Morton, Takashi Sakamoto, Eliav Farber,
	devicetree, linux-kernel

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


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

end of thread, other threads:[~2026-09-17 16:13 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 13:47 [PATCH 0/2] pps-gpio: restore pin mux on unbind and shutdown Eliav Farber
2026-09-16 13:47 ` [PATCH 1/2] dt-bindings: pps: pps-gpio: document optional idle pinctrl state Eliav Farber
2026-09-16 13:47 ` [PATCH 2/2] pps: clients: gpio: release pins to idle state on remove and shutdown Eliav Farber
2026-09-16 16:48 ` [PATCH 0/2] pps-gpio: restore pin mux on unbind " Rodolfo Giometti
2026-09-16 18:25   ` Farber, Eliav
2026-09-16 18:26 ` [PATCH v2 " Eliav Farber
2026-09-16 18:26   ` [PATCH v2 1/2] dt-bindings: pps: pps-gpio: document optional pinctrl states Eliav Farber
2026-09-17  7:13     ` Rodolfo Giometti
2026-09-17  7:48       ` Farber, Eliav
2026-09-16 18:26   ` [PATCH v2 2/2] pps: clients: gpio: release pins to an inactive state on remove and shutdown Eliav Farber
2026-09-17  7:14     ` Rodolfo Giometti
2026-09-17  7:52       ` Farber, Eliav
2026-09-17  7:56   ` [PATCH v3 0/3] pps-gpio: restore pin mux on unbind " Eliav Farber
2026-09-17  7:56     ` [PATCH v3 1/3] pps: clients: gpio: propagate probe error codes Eliav Farber
2026-09-17  9:58       ` Bartosz Golaszewski
2026-09-17  7:56     ` [PATCH v3 2/3] dt-bindings: pps: pps-gpio: document optional pinctrl states Eliav Farber
2026-09-17 15:35       ` Rob Herring (Arm)
2026-09-17 16:13       ` Rob Herring
2026-09-17  7:56     ` [PATCH v3 3/3] pps: clients: gpio: release pins to an inactive state on remove and shutdown Eliav Farber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®