Lines Matching refs:on
558 static void am65_cpts_extts_enable_hw(struct am65_cpts *cpts, u32 index, int on)
563 if (on) {
573 static int am65_cpts_extts_enable(struct am65_cpts *cpts, u32 index, int on)
581 if (((cpts->hw_ts_enable & BIT(index)) >> index) == on)
585 am65_cpts_extts_enable_hw(cpts, index, on);
589 __func__, index, on ? "enabled" : "disabled");
636 struct ptp_perout_request *req, int on)
642 if (on) {
673 struct ptp_perout_request *req, int on)
681 if (!!(cpts->genf_enable & BIT(req->index)) == !!on)
685 am65_cpts_perout_enable_hw(cpts, req, on);
689 __func__, req->index, on ? "enabled" : "disabled");
694 static int am65_cpts_pps_enable(struct am65_cpts *cpts, int on)
704 if (cpts->pps_enabled == !!on)
709 if (on) {
710 am65_cpts_extts_enable_hw(cpts, cpts->pps_hw_ts_idx, on);
720 am65_cpts_perout_enable_hw(cpts, &rq.perout, on);
724 am65_cpts_perout_enable_hw(cpts, &rq.perout, on);
725 am65_cpts_extts_enable_hw(cpts, cpts->pps_hw_ts_idx, on);
732 __func__, on ? "enabled" : "disabled");
737 struct ptp_clock_request *rq, int on)
743 return am65_cpts_extts_enable(cpts, rq->extts.index, on);
745 return am65_cpts_perout_enable(cpts, &rq->perout, on);
747 return am65_cpts_pps_enable(cpts, on);