Lines Matching full:pps

3  * pps-gpio.c -- PPS client driver using GPIO
9 #define PPS_GPIO_NAME "pps-gpio"
28 int irq; /* IRQ used as PPS source */
29 struct pps_device *pps; /* PPS source device */ member
30 struct pps_source_info info; /* PPS source information */
36 unsigned int echo_active_ms; /* PPS echo active duration */
41 * Report the PPS event
58 pps_event(info->pps, &ts, PPS_CAPTUREASSERT, data); in pps_gpio_irq_handler()
62 pps_event(info->pps, &ts, PPS_CAPTURECLEAR, data); in pps_gpio_irq_handler()
68 static void pps_gpio_echo(struct pps_device *pps, int event, void *data) in pps_gpio_echo() argument
75 if (pps->params.mode & PPS_ECHOASSERT) in pps_gpio_echo()
80 if (pps->params.mode & PPS_ECHOCLEAR) in pps_gpio_echo()
86 if (info->pps->params.mode & (PPS_ECHOASSERT | PPS_ECHOCLEAR)) { in pps_gpio_echo()
111 "failed to request PPS GPIO\n"); in pps_gpio_setup()
182 /* initialize PPS specific parts of the bookkeeping data structure. */ in pps_gpio_probe()
197 /* register PPS source */ in pps_gpio_probe()
201 data->pps = pps_register_source(&data->info, pps_default_params); in pps_gpio_probe()
202 if (IS_ERR(data->pps)) { in pps_gpio_probe()
203 dev_err(dev, "failed to register IRQ %d as PPS source\n", in pps_gpio_probe()
205 return PTR_ERR(data->pps); in pps_gpio_probe()
212 pps_unregister_source(data->pps); in pps_gpio_probe()
217 dev_info(data->pps->dev, "Registered IRQ %d as PPS source\n", in pps_gpio_probe()
227 pps_unregister_source(data->pps); in pps_gpio_remove()
231 dev_info(&pdev->dev, "removed IRQ %d as PPS source\n", data->irq); in pps_gpio_remove()
235 { .compatible = "pps-gpio", },
252 MODULE_DESCRIPTION("Use GPIO pin as PPS source");