[PATCH] pps: clients: pps-gpio: fix echo pin configuration
From: Dylan Laduranty via B4 Relay
Date: Fri Feb 27 2026 - 10:51:25 EST
From: Dylan Laduranty <dylan.laduranty@xxxxxxxxxxx>
This patch adds PPS_ECHOASSERT and PPS_ECHOCLEAR to pps_default_params
when needed.
The pps_gpio_echo() function will check if these flags are set inside
params.mode to update the echo pin state.
However, these flags need to be set during probe sequence otherwise
pps_gpio_echo() function will never update the pin's state.
Signed-off-by: Dylan Laduranty <dylan.laduranty@xxxxxxxxxxx>
---
drivers/pps/clients/pps-gpio.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
index 935da68610c701e6d9de53c667237f77438d7107..83ca24118eccfdb9eebe272023ef4980c9d54cf2 100644
--- a/drivers/pps/clients/pps-gpio.c
+++ b/drivers/pps/clients/pps-gpio.c
@@ -200,8 +200,13 @@ static int pps_gpio_probe(struct platform_device *pdev)
/* register PPS source */
pps_default_params = PPS_CAPTUREASSERT | PPS_OFFSETASSERT;
- if (data->capture_clear)
+ if (data->echo_pin)
+ pps_default_params |= PPS_ECHOASSERT;
+ if (data->capture_clear) {
pps_default_params |= PPS_CAPTURECLEAR | PPS_OFFSETCLEAR;
+ if (data->echo_pin)
+ pps_default_params |= PPS_ECHOCLEAR;
+ }
data->pps = pps_register_source(&data->info, pps_default_params);
if (IS_ERR(data->pps)) {
dev_err(dev, "failed to register IRQ %d as PPS source\n",
---
base-commit: 3fa5e5702a82d259897bd7e209469bc06368bf31
change-id: 20260227-drivers-pps-clients-fix-echo-pin-setup-fe52d3b8596f
Best regards,
--
Dylan Laduranty <dylan.laduranty@xxxxxxxxxxx>