Lines Matching refs:perout
428 struct lan743x_ptp_perout *perout = &ptp->perout[index]; in lan743x_ptp_perout_off() local
430 if (perout->gpio_pin >= 0) { in lan743x_ptp_perout_off()
431 lan743x_gpio_release(adapter, perout->gpio_pin); in lan743x_ptp_perout_off()
432 perout->gpio_pin = -1; in lan743x_ptp_perout_off()
435 if (perout->event_ch >= 0) { in lan743x_ptp_perout_off()
438 PTP_CLOCK_TARGET_SEC_X(perout->event_ch), in lan743x_ptp_perout_off()
441 PTP_CLOCK_TARGET_NS_X(perout->event_ch), in lan743x_ptp_perout_off()
446 (perout->event_ch); in lan743x_ptp_perout_off()
448 lan743x_ptp_release_event_ch(adapter, perout->event_ch); in lan743x_ptp_perout_off()
449 perout->event_ch = -1; in lan743x_ptp_perout_off()
463 struct lan743x_ptp_perout *perout = &ptp->perout[index]; in lan743x_ptp_perout() local
480 if (perout->event_ch >= 0 || in lan743x_ptp_perout()
481 perout->gpio_pin >= 0) { in lan743x_ptp_perout()
486 perout->event_ch = lan743x_ptp_reserve_event_ch(adapter, index); in lan743x_ptp_perout()
488 if (perout->event_ch < 0) { in lan743x_ptp_perout()
496 perout->gpio_pin = lan743x_gpio_rsrv_ptp_out(adapter, in lan743x_ptp_perout()
498 perout->event_ch); in lan743x_ptp_perout()
500 if (perout->gpio_pin < 0) { in lan743x_ptp_perout()
606 PTP_CLOCK_TARGET_SEC_X(perout->event_ch), in lan743x_ptp_perout()
609 PTP_CLOCK_TARGET_NS_X(perout->event_ch), 0); in lan743x_ptp_perout()
614 (perout->event_ch)); in lan743x_ptp_perout()
616 (perout->event_ch, pulse_width); in lan743x_ptp_perout()
618 (perout->event_ch); in lan743x_ptp_perout()
623 PTP_CLOCK_TARGET_RELOAD_SEC_X(perout->event_ch), in lan743x_ptp_perout()
626 PTP_CLOCK_TARGET_RELOAD_NS_X(perout->event_ch), in lan743x_ptp_perout()
631 PTP_CLOCK_TARGET_SEC_X(perout->event_ch), in lan743x_ptp_perout()
634 PTP_CLOCK_TARGET_NS_X(perout->event_ch), in lan743x_ptp_perout()
982 if (request->perout.index < ptpci->n_per_out) { in lan743x_ptpci_enable()
985 &request->perout); in lan743x_ptpci_enable()
988 &request->perout); in lan743x_ptpci_enable()
1473 ptp->perout[i].event_ch = -1; in lan743x_ptp_init()
1474 ptp->perout[i].gpio_pin = -1; in lan743x_ptp_init()