Lines Matching refs:ptp_info
58 static int bnxt_ptp_settime(struct ptp_clock_info *ptp_info, in bnxt_ptp_settime() argument
61 struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg, in bnxt_ptp_settime()
62 ptp_info); in bnxt_ptp_settime()
138 static int bnxt_ptp_gettimex(struct ptp_clock_info *ptp_info, in bnxt_ptp_gettimex() argument
142 struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg, in bnxt_ptp_gettimex()
143 ptp_info); in bnxt_ptp_gettimex()
193 static int bnxt_ptp_adjtime(struct ptp_clock_info *ptp_info, s64 delta) in bnxt_ptp_adjtime() argument
195 struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg, in bnxt_ptp_adjtime()
196 ptp_info); in bnxt_ptp_adjtime()
207 static int bnxt_ptp_adjfreq(struct ptp_clock_info *ptp_info, s32 ppb) in bnxt_ptp_adjfreq() argument
209 struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg, in bnxt_ptp_adjfreq()
210 ptp_info); in bnxt_ptp_adjfreq()
349 !(ptp->ptp_info.pin_config)) in bnxt_ptp_reapply_pps()
422 static int bnxt_ptp_enable(struct ptp_clock_info *ptp_info, in bnxt_ptp_enable() argument
425 struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg, in bnxt_ptp_enable()
426 ptp_info); in bnxt_ptp_enable()
690 static long bnxt_ptp_ts_aux_work(struct ptp_clock_info *ptp_info) in bnxt_ptp_ts_aux_work() argument
692 struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg, in bnxt_ptp_ts_aux_work()
693 ptp_info); in bnxt_ptp_ts_aux_work()
760 static int bnxt_ptp_verify(struct ptp_clock_info *ptp_info, unsigned int pin, in bnxt_ptp_verify() argument
763 struct bnxt_ptp_cfg *ptp = container_of(ptp_info, struct bnxt_ptp_cfg, in bnxt_ptp_verify()
764 ptp_info); in bnxt_ptp_verify()
778 struct ptp_clock_info *ptp_info; in bnxt_ptp_pps_init() local
795 ptp_info = &ptp->ptp_info; in bnxt_ptp_pps_init()
798 ptp_info->n_pins = pps_info->num_pins; in bnxt_ptp_pps_init()
799 ptp_info->pin_config = kcalloc(ptp_info->n_pins, in bnxt_ptp_pps_init()
800 sizeof(*ptp_info->pin_config), in bnxt_ptp_pps_init()
802 if (!ptp_info->pin_config) { in bnxt_ptp_pps_init()
810 snprintf(ptp_info->pin_config[i].name, in bnxt_ptp_pps_init()
811 sizeof(ptp_info->pin_config[i].name), "bnxt_pps%d", i); in bnxt_ptp_pps_init()
812 ptp_info->pin_config[i].index = i; in bnxt_ptp_pps_init()
813 ptp_info->pin_config[i].chan = i; in bnxt_ptp_pps_init()
815 ptp_info->pin_config[i].func = PTP_PF_EXTTS; in bnxt_ptp_pps_init()
817 ptp_info->pin_config[i].func = PTP_PF_PEROUT; in bnxt_ptp_pps_init()
819 ptp_info->pin_config[i].func = PTP_PF_NONE; in bnxt_ptp_pps_init()
826 ptp_info->n_ext_ts = 1; in bnxt_ptp_pps_init()
827 ptp_info->n_per_out = 1; in bnxt_ptp_pps_init()
828 ptp_info->pps = 1; in bnxt_ptp_pps_init()
829 ptp_info->verify = bnxt_ptp_verify; in bnxt_ptp_pps_init()
838 return !(bp->fw_cap & BNXT_FW_CAP_PTP_PPS) == !ptp->ptp_info.pin_config; in bnxt_pps_config_ok()
899 kfree(ptp->ptp_info.pin_config); in bnxt_ptp_free()
900 ptp->ptp_info.pin_config = NULL; in bnxt_ptp_free()
933 ptp->ptp_info = bnxt_ptp_caps; in bnxt_ptp_init()
938 ptp->ptp_clock = ptp_clock_register(&ptp->ptp_info, &bp->pdev->dev); in bnxt_ptp_init()
972 kfree(ptp->ptp_info.pin_config); in bnxt_ptp_clear()
973 ptp->ptp_info.pin_config = NULL; in bnxt_ptp_clear()