Home
last modified time | relevance | path

Searched refs:pps (Results 1 – 25 of 105) sorted by relevance

12345

/Linux-v4.19/drivers/pps/
Dpps.c54 struct pps_device *pps = file->private_data; in pps_cdev_poll() local
56 poll_wait(file, &pps->queue, wait); in pps_cdev_poll()
63 struct pps_device *pps = file->private_data; in pps_cdev_fasync() local
64 return fasync_helper(fd, file, on, &pps->async_queue); in pps_cdev_fasync()
67 static int pps_cdev_pps_fetch(struct pps_device *pps, struct pps_fdata *fdata) in pps_cdev_pps_fetch() argument
69 unsigned int ev = pps->last_ev; in pps_cdev_pps_fetch()
74 err = wait_event_interruptible(pps->queue, in pps_cdev_pps_fetch()
75 ev != pps->last_ev); in pps_cdev_pps_fetch()
79 dev_dbg(pps->dev, "timeout %lld.%09d\n", in pps_cdev_pps_fetch()
87 pps->queue, in pps_cdev_pps_fetch()
[all …]
Dkapi.c55 static void pps_echo_client_default(struct pps_device *pps, int event, in pps_echo_client_default() argument
58 dev_info(pps->dev, "echo %s %s\n", in pps_echo_client_default()
81 struct pps_device *pps; in pps_register_source() local
99 pps = kzalloc(sizeof(struct pps_device), GFP_KERNEL); in pps_register_source()
100 if (pps == NULL) { in pps_register_source()
108 pps->params.api_version = PPS_API_VERS; in pps_register_source()
109 pps->params.mode = default_params; in pps_register_source()
110 pps->info = *info; in pps_register_source()
113 if ((pps->info.mode & (PPS_ECHOASSERT | PPS_ECHOCLEAR)) && in pps_register_source()
114 pps->info.echo == NULL) in pps_register_source()
[all …]
Dsysfs.c35 struct pps_device *pps = dev_get_drvdata(dev); in assert_show() local
37 if (!(pps->info.mode & PPS_CAPTUREASSERT)) in assert_show()
41 (long long) pps->assert_tu.sec, pps->assert_tu.nsec, in assert_show()
42 pps->assert_sequence); in assert_show()
49 struct pps_device *pps = dev_get_drvdata(dev); in clear_show() local
51 if (!(pps->info.mode & PPS_CAPTURECLEAR)) in clear_show()
55 (long long) pps->clear_tu.sec, pps->clear_tu.nsec, in clear_show()
56 pps->clear_sequence); in clear_show()
63 struct pps_device *pps = dev_get_drvdata(dev); in mode_show() local
65 return sprintf(buf, "%4x\n", pps->info.mode); in mode_show()
[all …]
Dkc.c49 int pps_kc_bind(struct pps_device *pps, struct pps_bind_args *bind_args) in pps_kc_bind() argument
55 if (pps_kc_hardpps_dev == pps) { in pps_kc_bind()
59 dev_info(pps->dev, "unbound kernel" in pps_kc_bind()
63 dev_err(pps->dev, "selected kernel consumer" in pps_kc_bind()
69 pps_kc_hardpps_dev == pps) { in pps_kc_bind()
71 pps_kc_hardpps_dev = pps; in pps_kc_bind()
73 dev_info(pps->dev, "bound kernel consumer: " in pps_kc_bind()
77 dev_err(pps->dev, "another kernel consumer" in pps_kc_bind()
92 void pps_kc_remove(struct pps_device *pps) in pps_kc_remove() argument
95 if (pps == pps_kc_hardpps_dev) { in pps_kc_remove()
[all …]
Dkc.h29 extern int pps_kc_bind(struct pps_device *pps,
31 extern void pps_kc_remove(struct pps_device *pps);
32 extern void pps_kc_event(struct pps_device *pps,
38 static inline int pps_kc_bind(struct pps_device *pps, in pps_kc_bind() argument
40 static inline void pps_kc_remove(struct pps_device *pps) {} in pps_kc_remove() argument
41 static inline void pps_kc_event(struct pps_device *pps, in pps_kc_event() argument
/Linux-v4.19/drivers/pps/clients/
Dpps-ldisc.c34 struct pps_device *pps; in pps_tty_dcd_change() local
39 pps = pps_lookup_dev(tty); in pps_tty_dcd_change()
44 if (WARN_ON_ONCE(pps == NULL)) in pps_tty_dcd_change()
48 pps_event(pps, &ts, status ? PPS_CAPTUREASSERT : in pps_tty_dcd_change()
51 dev_dbg(pps->dev, "PPS %s at %lu\n", in pps_tty_dcd_change()
62 struct pps_device *pps; in pps_tty_open() local
73 pps = pps_register_source(&info, PPS_CAPTUREBOTH | \ in pps_tty_open()
75 if (pps == NULL) { in pps_tty_open()
79 pps->lookup_cookie = tty; in pps_tty_open()
88 dev_info(pps->dev, "source \"%s\" added\n", info.path); in pps_tty_open()
[all …]
Dpps-ktimer.c35 static struct pps_device *pps; variable
49 pps_event(pps, &ts, PPS_CAPTUREASSERT, NULL); in pps_ktimer_event()
73 dev_info(pps->dev, "ktimer PPS source unregistered\n"); in pps_ktimer_exit()
76 pps_unregister_source(pps); in pps_ktimer_exit()
81 pps = pps_register_source(&pps_ktimer_info, in pps_ktimer_init()
83 if (pps == NULL) { in pps_ktimer_init()
91 dev_info(pps->dev, "ktimer PPS source registered\n"); in pps_ktimer_init()
Dpps_parport.c57 struct pps_device *pps; /* PPS device */ member
100 dev_err(dev->pps->dev, "lost the signal\n"); in parport_irq()
117 dev_err(dev->pps->dev, "disabled clear edge capture after %d" in parport_irq()
125 pps_event(dev->pps, &ts_assert, in parport_irq()
131 pps_event(dev->pps, &ts_assert, in parport_irq()
134 pps_event(dev->pps, &ts_clear, in parport_irq()
180 device->pps = pps_register_source(&info, in parport_attach()
182 if (device->pps == NULL) { in parport_attach()
218 pps_unregister_source(device->pps); in parport_detach()
Dpps-gpio.c42 struct pps_device *pps; /* PPS source device */ member
67 pps_event(info->pps, &ts, PPS_CAPTUREASSERT, NULL); in pps_gpio_irq_handler()
71 pps_event(info->pps, &ts, PPS_CAPTURECLEAR, NULL); in pps_gpio_irq_handler()
160 data->pps = pps_register_source(&data->info, pps_default_params); in pps_gpio_probe()
161 if (data->pps == NULL) { in pps_gpio_probe()
171 pps_unregister_source(data->pps); in pps_gpio_probe()
177 dev_info(data->pps->dev, "Registered IRQ %d as PPS source\n", in pps_gpio_probe()
187 pps_unregister_source(data->pps); in pps_gpio_remove()
DMakefile5 obj-$(CONFIG_PPS_CLIENT_KTIMER) += pps-ktimer.o
6 obj-$(CONFIG_PPS_CLIENT_LDISC) += pps-ldisc.o
8 obj-$(CONFIG_PPS_CLIENT_GPIO) += pps-gpio.o
/Linux-v4.19/samples/bpf/
Dxdp_monitor_user.c237 double pps = 0; in calc_pps() local
241 pps = packets / period; in calc_pps()
243 return pps; in calc_pps()
249 double pps = 0; in calc_pps_u64() local
253 pps = packets / period; in calc_pps_u64()
255 return pps; in calc_pps_u64()
261 double pps = 0; in calc_drop() local
265 pps = packets / period; in calc_drop()
267 return pps; in calc_drop()
273 double pps = 0; in calc_info() local
[all …]
Dxdp_redirect_cpu_user.c230 __u64 pps = 0; in calc_pps() local
234 pps = packets / period_; in calc_pps()
236 return pps; in calc_pps()
242 __u64 pps = 0; in calc_drop_pps() local
246 pps = packets / period_; in calc_drop_pps()
248 return pps; in calc_drop_pps()
255 __u64 pps = 0; in calc_errs_pps() local
259 pps = packets / period_; in calc_errs_pps()
261 return pps; in calc_errs_pps()
269 double pps = 0, drop = 0, err = 0; in stats_print() local
[all …]
Dxdp_rxq_info_user.c304 __u64 pps = 0; in calc_pps() local
308 pps = packets / period_; in calc_pps()
310 return pps; in calc_pps()
317 __u64 pps = 0; in calc_errs_pps() local
321 pps = packets / period_; in calc_errs_pps()
323 return pps; in calc_errs_pps()
332 double pps = 0, err = 0; in stats_print() local
358 pps = calc_pps (r, p, t); in stats_print()
362 if (pps > 0) in stats_print()
364 i, pps, err, errstr); in stats_print()
[all …]
/Linux-v4.19/Documentation/ABI/testing/
Dsysfs-pps1 What: /sys/class/pps/
5 The /sys/class/pps/ directory will contain files and
9 What: /sys/class/pps/ppsX/
13 The /sys/class/pps/ppsX/ directory is related to X-th
17 What: /sys/class/pps/ppsX/assert
21 The /sys/class/pps/ppsX/assert file reports the assert events
29 What: /sys/class/pps/ppsX/clear
33 The /sys/class/pps/ppsX/clear file reports the clear events
41 What: /sys/class/pps/ppsX/mode
45 The /sys/class/pps/ppsX/mode file reports the functioning
[all …]
/Linux-v4.19/drivers/gpu/drm/i915/
Dintel_lvds.c156 struct intel_lvds_pps *pps) in intel_lvds_pps_get_hw_state() argument
160 pps->powerdown_on_reset = I915_READ(PP_CONTROL(0)) & PANEL_POWER_RESET; in intel_lvds_pps_get_hw_state()
163 pps->port = (val & PANEL_PORT_SELECT_MASK) >> in intel_lvds_pps_get_hw_state()
165 pps->t1_t2 = (val & PANEL_POWER_UP_DELAY_MASK) >> in intel_lvds_pps_get_hw_state()
167 pps->t5 = (val & PANEL_LIGHT_ON_DELAY_MASK) >> in intel_lvds_pps_get_hw_state()
171 pps->t3 = (val & PANEL_POWER_DOWN_DELAY_MASK) >> in intel_lvds_pps_get_hw_state()
173 pps->tx = (val & PANEL_LIGHT_OFF_DELAY_MASK) >> in intel_lvds_pps_get_hw_state()
177 pps->divider = (val & PP_REFERENCE_DIVIDER_MASK) >> in intel_lvds_pps_get_hw_state()
189 pps->t4 = val * 1000; in intel_lvds_pps_get_hw_state()
192 pps->t1_t2 == 0 && pps->t5 == 0 && pps->t3 == 0 && pps->tx == 0) { in intel_lvds_pps_get_hw_state()
[all …]
/Linux-v4.19/include/linux/
Dpps_kernel.h41 void (*echo)(struct pps_device *pps,
91 extern int pps_register_cdev(struct pps_device *pps);
92 extern void pps_unregister_cdev(struct pps_device *pps);
100 extern void pps_unregister_source(struct pps_device *pps);
101 extern void pps_event(struct pps_device *pps,
/Linux-v4.19/net/netfilter/
Dxt_rateest.c29 pps1 = info->pps1 >= sample.pps ? info->pps1 - sample.pps : 0; in xt_rateest_mt()
32 pps1 = sample.pps; in xt_rateest_mt()
43 pps2 = info->pps2 >= sample.pps ? info->pps2 - sample.pps : 0; in xt_rateest_mt()
46 pps2 = sample.pps; in xt_rateest_mt()
/Linux-v4.19/drivers/gpu/drm/msm/disp/dpu1/
Ddpu_vbif.c72 u64 pps; in _dpu_vbif_apply_dynamic_ot_limit() local
83 pps = params->frame_rate; in _dpu_vbif_apply_dynamic_ot_limit()
84 pps *= params->width; in _dpu_vbif_apply_dynamic_ot_limit()
85 pps *= params->height; in _dpu_vbif_apply_dynamic_ot_limit()
91 if (pps <= tbl->cfg[i].pps) { in _dpu_vbif_apply_dynamic_ot_limit()
100 pps, *ot_lim); in _dpu_vbif_apply_dynamic_ot_limit()
360 (u64 *)&cfg->pps); in dpu_debugfs_vbif_init()
374 (u64 *)&cfg->pps); in dpu_debugfs_vbif_init()
/Linux-v4.19/Documentation/devicetree/bindings/pps/
Dpps-gpio.txt7 - compatible: should be "pps-gpio"
15 pps {
22 compatible = "pps-gpio";
/Linux-v4.19/drivers/ptp/
Dptp_clock.c260 if (info->pps) { in ptp_clock_register()
261 struct pps_source_info pps; in ptp_clock_register() local
262 memset(&pps, 0, sizeof(pps)); in ptp_clock_register()
263 snprintf(pps.name, PPS_MAX_NAME_LEN, "ptp%d", index); in ptp_clock_register()
264 pps.mode = PTP_PPS_MODE; in ptp_clock_register()
265 pps.owner = info->owner; in ptp_clock_register()
266 ptp->pps_source = pps_register_source(&pps, PTP_PPS_DEFAULTS); in ptp_clock_register()
/Linux-v4.19/Documentation/pps/
Dpps.txt131 Please see the file drivers/pps/clients/pps-ktimer.c for example code.
139 $ ls /sys/class/pps/
145 $ ls -F /sys/class/pps/pps0/
153 $ cat /sys/class/pps/pps0/assert
173 the pps-ktimer driver (see the client subsection in the PPS configuration menu)
174 and the userland tools available in your distribution's pps-tools package,
175 http://linuxpps.org , or https://github.com/redlab-i/pps-tools.
177 Once you have enabled the compilation of pps-ktimer just modprobe it (if
180 # modprobe pps-ktimer
193 This is available in the pps-tools repository mentioned above.
/Linux-v4.19/include/uapi/linux/
Dgen_stats.h40 __u32 pps; member
50 __u64 pps; member
/Linux-v4.19/tools/testing/selftests/ptp/
Dtestptp.c179 int pps = -1; in main() local
232 pps = atoi(optarg); in main()
285 caps.pps, in main()
469 if (pps != -1) { in main()
470 int enable = pps ? 1 : 0; in main()
/Linux-v4.19/drivers/gpu/drm/gma500/
Dintel_bios.c93 dev_priv->edp.pps = *edp_pps; in parse_edp()
96 dev_priv->edp.pps.t1_t3, dev_priv->edp.pps.t8, in parse_edp()
97 dev_priv->edp.pps.t9, dev_priv->edp.pps.t10, in parse_edp()
98 dev_priv->edp.pps.t11_t12); in parse_edp()
/Linux-v4.19/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_ptp.c153 cfg = &priv->pps[rq->perout.index]; in stmmac_enable()
183 .pps = 0,
204 priv->pps[i].available = true; in stmmac_ptp_register()

12345