| Message ID | 20261104172912.26456-4-farbere@amazon.com |
|---|---|
| State | New |
| Headers | show |
| Series | pps-gpio: restore pin mux on unbind and shutdown | expand |
On Wed, Nov 04, 2026 at 05:29:11PM +0000, Eliav Farber wrote: > When the PPS input GPIO is routed through a pin controller, a board may > need to mux those pins to a different function while pps-gpio is not > driving PPS (for example after the driver is unbound or across a kexec). > > Document the optional "default" and "inactive" pinctrl-names and show > both in the example. The "default" state selects the PPS/GPIO function > and is applied by the driver core before probe; the optional "inactive" > state, when present, describes the mux to restore when the driver is > unbound or the system is shut down. "default" is pinctrl-0, matching the > implicit ordering the pinctrl core already assigns it, and "inactive" is > pinctrl-1; the driver looks each state up by name. > > Signed-off-by: Eliav Farber <farbere@amazon.com> > Acked-by: Rodolfo Giometti <giometti@enneenne.com> > Reviewed-by: Rob Herring (Arm) <robh@kernel.org> > --- Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
diff --git a/Documentation/devicetree/bindings/pps/pps-gpio.yaml b/Documentation/devicetree/bindings/pps/pps-gpio.yaml index 383a838744eb..61b5de6724ea 100644 --- a/Documentation/devicetree/bindings/pps/pps-gpio.yaml +++ b/Documentation/devicetree/bindings/pps/pps-gpio.yaml @@ -28,6 +28,17 @@ properties: description: Indicates a falling edge assert, when present. Rising edge if absent. type: boolean + pinctrl-names: + description: + The "default" state selects the PPS/GPIO function and is applied by the + driver core before probe. The optional "inactive" state, when present, + is selected when the driver is unbound or the system is shut down, + handing the pins back to their alternate function. + minItems: 1 + items: + - const: default + - const: inactive + required: - compatible - gpios @@ -40,8 +51,9 @@ examples: pps { compatible = "pps-gpio"; - pinctrl-names = "default"; + pinctrl-names = "default", "inactive"; pinctrl-0 = <&pinctrl_pps>; + pinctrl-1 = <&pinctrl_pps_inactive>; gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>; assert-falling-edge; echo-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;