drivers/pps/clients/pps-gpio.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
From: Dylan Laduranty <dylan.laduranty@mesotic.com>
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@mesotic.com>
---
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@mesotic.com>
On 2/27/26 16:45, Dylan Laduranty via B4 Relay wrote:
> From: Dylan Laduranty <dylan.laduranty@mesotic.com>
>
> 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@mesotic.com>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
> ---
> 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,
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming
© 2016 - 2026 Red Hat, Inc.