Lines Matching refs:perout
458 struct lan743x_ptp_perout *perout = &ptp->perout[index]; in lan743x_ptp_perout_off() local
460 if (perout->gpio_pin >= 0) { in lan743x_ptp_perout_off()
461 lan743x_gpio_release(adapter, perout->gpio_pin); in lan743x_ptp_perout_off()
462 perout->gpio_pin = -1; in lan743x_ptp_perout_off()
465 if (perout->event_ch >= 0) { in lan743x_ptp_perout_off()
468 PTP_CLOCK_TARGET_SEC_X(perout->event_ch), in lan743x_ptp_perout_off()
471 PTP_CLOCK_TARGET_NS_X(perout->event_ch), in lan743x_ptp_perout_off()
476 (perout->event_ch); in lan743x_ptp_perout_off()
478 lan743x_ptp_release_event_ch(adapter, perout->event_ch); in lan743x_ptp_perout_off()
479 perout->event_ch = -1; in lan743x_ptp_perout_off()
493 struct lan743x_ptp_perout *perout = &ptp->perout[index]; in lan743x_ptp_perout() local
509 if (perout->event_ch >= 0 || in lan743x_ptp_perout()
510 perout->gpio_pin >= 0) { in lan743x_ptp_perout()
515 perout->event_ch = lan743x_ptp_reserve_event_ch(adapter, index); in lan743x_ptp_perout()
517 if (perout->event_ch < 0) { in lan743x_ptp_perout()
524 perout->gpio_pin = lan743x_gpio_rsrv_ptp_out(adapter, in lan743x_ptp_perout()
526 perout->event_ch); in lan743x_ptp_perout()
528 if (perout->gpio_pin < 0) { in lan743x_ptp_perout()
567 PTP_CLOCK_TARGET_SEC_X(perout->event_ch), in lan743x_ptp_perout()
570 PTP_CLOCK_TARGET_NS_X(perout->event_ch), 0); in lan743x_ptp_perout()
575 (perout->event_ch)); in lan743x_ptp_perout()
577 (perout->event_ch, pulse_width); in lan743x_ptp_perout()
579 (perout->event_ch); in lan743x_ptp_perout()
584 PTP_CLOCK_TARGET_RELOAD_SEC_X(perout->event_ch), in lan743x_ptp_perout()
587 PTP_CLOCK_TARGET_RELOAD_NS_X(perout->event_ch), in lan743x_ptp_perout()
592 PTP_CLOCK_TARGET_SEC_X(perout->event_ch), in lan743x_ptp_perout()
595 PTP_CLOCK_TARGET_NS_X(perout->event_ch), in lan743x_ptp_perout()
618 if (request->perout.index < ptpci->n_per_out) in lan743x_ptpci_enable()
620 &request->perout); in lan743x_ptpci_enable()
959 ptp->perout[i].event_ch = -1; in lan743x_ptp_init()
960 ptp->perout[i].gpio_pin = -1; in lan743x_ptp_init()