Lines Matching full:pps
3 * pps-gpio.c -- PPS client driver using GPIO
9 #define PPS_GPIO_NAME "pps-gpio"
19 #include <linux/pps-gpio.h>
29 int irq; /* IRQ used as PPS source */
30 struct pps_device *pps; /* PPS source device */ member
31 struct pps_source_info info; /* PPS source information */
37 unsigned int echo_active_ms; /* PPS echo active duration */
42 * Report the PPS event
59 pps_event(info->pps, &ts, PPS_CAPTUREASSERT, data); in pps_gpio_irq_handler()
63 pps_event(info->pps, &ts, PPS_CAPTURECLEAR, data); in pps_gpio_irq_handler()
69 static void pps_gpio_echo(struct pps_device *pps, int event, void *data) in pps_gpio_echo() argument
76 if (pps->params.mode & PPS_ECHOASSERT) in pps_gpio_echo()
81 if (pps->params.mode & PPS_ECHOCLEAR) in pps_gpio_echo()
87 if (info->pps->params.mode & (PPS_ECHOASSERT | PPS_ECHOCLEAR)) { in pps_gpio_echo()
115 "failed to request PPS GPIO\n"); in pps_gpio_setup()
200 /* initialize PPS specific parts of the bookkeeping data structure. */ in pps_gpio_probe()
215 /* register PPS source */ in pps_gpio_probe()
219 data->pps = pps_register_source(&data->info, pps_default_params); in pps_gpio_probe()
220 if (IS_ERR(data->pps)) { in pps_gpio_probe()
221 dev_err(&pdev->dev, "failed to register IRQ %d as PPS source\n", in pps_gpio_probe()
223 return PTR_ERR(data->pps); in pps_gpio_probe()
230 pps_unregister_source(data->pps); in pps_gpio_probe()
235 dev_info(data->pps->dev, "Registered IRQ %d as PPS source\n", in pps_gpio_probe()
245 pps_unregister_source(data->pps); in pps_gpio_remove()
251 dev_info(&pdev->dev, "removed IRQ %d as PPS source\n", data->irq); in pps_gpio_remove()
256 { .compatible = "pps-gpio", },
273 MODULE_DESCRIPTION("Use GPIO pin as PPS source");