Symbol: idtfc3
drivers/ptp/ptp_fc3.c
108
return regmap_bulk_write(idtfc3->regmap, LPF_CTRL, &val, sizeof(val));
drivers/ptp/ptp_fc3.c
111
static int idtfc3_get_time_ref_freq(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
118
err = regmap_bulk_read(idtfc3->regmap, TIME_CLOCK_MEAS_DIV_CNFG, buf, sizeof(buf));
drivers/ptp/ptp_fc3.c
123
err = regmap_bulk_read(idtfc3->regmap, TIME_CLOCK_COUNT, buf, 1);
drivers/ptp/ptp_fc3.c
127
idtfc3->time_ref_freq = idtfc3->hw_param.time_clk_freq *
drivers/ptp/ptp_fc3.c
133
static int idtfc3_get_tdc_offset_sign(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
140
err = regmap_bulk_read(idtfc3->regmap, TIME_CLOCK_TDC_FANOUT_CNFG, buf, sizeof(buf));
drivers/ptp/ptp_fc3.c
146
dev_err(idtfc3->dev, "TIME_SYNC_TO_TDC_EN is off !!!");
drivers/ptp/ptp_fc3.c
154
dev_err(idtfc3->dev, "Invalid tdc_mux_sel sig1=%d sig2=%d", sig1, sig2);
drivers/ptp/ptp_fc3.c
157
idtfc3->tdc_offset_sign = 1;
drivers/ptp/ptp_fc3.c
159
idtfc3->tdc_offset_sign = -1;
drivers/ptp/ptp_fc3.c
165
static int idtfc3_lpf_bw(struct idtfc3 *idtfc3, u8 shift, u8 mult)
drivers/ptp/ptp_fc3.c
169
return regmap_bulk_write(idtfc3->regmap, LPF_BW_CNFG, &val, sizeof(val));
drivers/ptp/ptp_fc3.c
172
static int idtfc3_enable_tdc(struct idtfc3 *idtfc3, bool enable, u8 meas_mode)
drivers/ptp/ptp_fc3.c
178
err = regmap_bulk_write(idtfc3->regmap, TIME_CLOCK_MEAS_CTRL, &val, sizeof(val));
drivers/ptp/ptp_fc3.c
183
return idtfc3_lpf_bw(idtfc3, LPF_BW_SHIFT_DEFAULT, LPF_BW_MULT_DEFAULT);
drivers/ptp/ptp_fc3.c
189
err = regmap_bulk_write(idtfc3->regmap, TIME_CLOCK_MEAS_CNFG,
drivers/ptp/ptp_fc3.c
198
err = regmap_bulk_write(idtfc3->regmap, TIME_CLOCK_MEAS_CTRL, &val, sizeof(val));
drivers/ptp/ptp_fc3.c
202
return idtfc3_lpf_bw(idtfc3, LPF_BW_SHIFT_1PPS, LPF_BW_MULT_DEFAULT);
drivers/ptp/ptp_fc3.c
205
static bool get_tdc_meas(struct idtfc3 *idtfc3, s64 *offset_ns)
drivers/ptp/ptp_fc3.c
213
err = regmap_bulk_read(idtfc3->regmap, TDC_FIFO_STS,
drivers/ptp/ptp_fc3.c
221
err = regmap_bulk_read(idtfc3->regmap, TDC_FIFO_READ_REQ,
drivers/ptp/ptp_fc3.c
230
*offset_ns = tdc_meas2offset(idtfc3, get_unaligned_le64(&buf[1]));
drivers/ptp/ptp_fc3.c
235
static int check_tdc_fifo_overrun(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
241
err = regmap_bulk_read(idtfc3->regmap, TDC_FIFO_STS, &val, sizeof(val));
drivers/ptp/ptp_fc3.c
248
dev_warn(idtfc3->dev, "TDC FIFO overrun !!!");
drivers/ptp/ptp_fc3.c
250
err = idtfc3_enable_tdc(idtfc3, true, CONTINUOUS);
drivers/ptp/ptp_fc3.c
257
static int get_tdc_meas_continuous(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
263
err = check_tdc_fifo_overrun(idtfc3);
drivers/ptp/ptp_fc3.c
267
if (get_tdc_meas(idtfc3, &offset_ns) && offset_ns >= 0) {
drivers/ptp/ptp_fc3.c
269
event.offset = tdc_offset2phase(idtfc3, offset_ns);
drivers/ptp/ptp_fc3.c
271
ptp_clock_event(idtfc3->ptp_clock, &event);
drivers/ptp/ptp_fc3.c
277
static int idtfc3_read_subcounter(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
282
err = regmap_bulk_read(idtfc3->regmap, TOD_COUNTER_READ_REQ,
drivers/ptp/ptp_fc3.c
291
static int idtfc3_tod_update_is_done(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
297
idtfc3->tc_write_timeout, true, idtfc3->regmap,
drivers/ptp/ptp_fc3.c
300
dev_err(idtfc3->dev, "TOD counter write timeout !!!");
drivers/ptp/ptp_fc3.c
305
static int idtfc3_write_subcounter(struct idtfc3 *idtfc3, u32 counter)
drivers/ptp/ptp_fc3.c
316
err = regmap_bulk_write(idtfc3->regmap, TOD_SYNC_LOAD_VAL_CTRL,
drivers/ptp/ptp_fc3.c
321
return idtfc3_tod_update_is_done(idtfc3);
drivers/ptp/ptp_fc3.c
324
static int idtfc3_timecounter_update(struct idtfc3 *idtfc3, u32 counter, s64 ns)
drivers/ptp/ptp_fc3.c
328
err = idtfc3_write_subcounter(idtfc3, counter);
drivers/ptp/ptp_fc3.c
333
idtfc3->ns = ns;
drivers/ptp/ptp_fc3.c
334
idtfc3->last_counter = counter;
drivers/ptp/ptp_fc3.c
339
static int idtfc3_timecounter_read(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
343
now = idtfc3_read_subcounter(idtfc3);
drivers/ptp/ptp_fc3.c
348
if (now >= idtfc3->last_counter)
drivers/ptp/ptp_fc3.c
349
delta = now - idtfc3->last_counter;
drivers/ptp/ptp_fc3.c
351
delta = idtfc3->sub_sync_count - idtfc3->last_counter + now;
drivers/ptp/ptp_fc3.c
354
idtfc3->ns += delta * idtfc3->ns_per_counter;
drivers/ptp/ptp_fc3.c
355
idtfc3->last_counter = now;
drivers/ptp/ptp_fc3.c
360
static int _idtfc3_gettime(struct idtfc3 *idtfc3, struct timespec64 *ts)
drivers/ptp/ptp_fc3.c
364
err = idtfc3_timecounter_read(idtfc3);
drivers/ptp/ptp_fc3.c
368
*ts = ns_to_timespec64(idtfc3->ns);
drivers/ptp/ptp_fc3.c
375
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
378
mutex_lock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
379
err = _idtfc3_gettime(idtfc3, ts);
drivers/ptp/ptp_fc3.c
38
static s64 ns2counters(struct idtfc3 *idtfc3, s64 nsec, u32 *sub_ns)
drivers/ptp/ptp_fc3.c
380
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
385
static int _idtfc3_settime(struct idtfc3 *idtfc3, const struct timespec64 *ts)
drivers/ptp/ptp_fc3.c
392
dev_err(idtfc3->dev, "%s: invalid timespec", __func__);
drivers/ptp/ptp_fc3.c
396
now = idtfc3_read_subcounter(idtfc3);
drivers/ptp/ptp_fc3.c
400
offset_ns = (idtfc3->sub_sync_count - now) * idtfc3->ns_per_counter;
drivers/ptp/ptp_fc3.c
402
(void)ns2counters(idtfc3, offset_ns + now_ns, &sub_ns);
drivers/ptp/ptp_fc3.c
404
counter = sub_ns / idtfc3->ns_per_counter;
drivers/ptp/ptp_fc3.c
405
return idtfc3_timecounter_update(idtfc3, counter, now_ns);
drivers/ptp/ptp_fc3.c
410
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
413
mutex_lock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
414
err = _idtfc3_settime(idtfc3, ts);
drivers/ptp/ptp_fc3.c
415
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
420
static int _idtfc3_adjtime(struct idtfc3 *idtfc3, s64 delta)
drivers/ptp/ptp_fc3.c
430
if (idtfc3->ns + delta < 0) {
drivers/ptp/ptp_fc3.c
431
dev_err(idtfc3->dev, "%lld ns adj is too large", delta);
drivers/ptp/ptp_fc3.c
435
sync_ns = ns2counters(idtfc3, delta + idtfc3->ns_per_sync, &sub_ns);
drivers/ptp/ptp_fc3.c
437
counter = sub_ns / idtfc3->ns_per_counter;
drivers/ptp/ptp_fc3.c
438
return idtfc3_timecounter_update(idtfc3, counter, idtfc3->ns + sync_ns +
drivers/ptp/ptp_fc3.c
439
counter * idtfc3->ns_per_counter);
drivers/ptp/ptp_fc3.c
44
sync = div_u64_rem(nsec, idtfc3->ns_per_sync, &rem);
drivers/ptp/ptp_fc3.c
444
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
447
mutex_lock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
448
err = _idtfc3_adjtime(idtfc3, delta);
drivers/ptp/ptp_fc3.c
449
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
454
static int _idtfc3_adjphase(struct idtfc3 *idtfc3, s32 delta)
drivers/ptp/ptp_fc3.c
460
err = idtfc3_set_lpf_mode(idtfc3, LPF_WP);
drivers/ptp/ptp_fc3.c
47
sync = -div_u64_rem(-nsec - 1, idtfc3->ns_per_sync, &rem) - 1;
drivers/ptp/ptp_fc3.c
472
pcw = div_s64((s64)delta * idtfc3->tdc_apll_freq * 124, NSEC_PER_SEC);
drivers/ptp/ptp_fc3.c
476
return regmap_bulk_write(idtfc3->regmap, LPF_WR_PHASE_CTRL, buf, sizeof(buf));
drivers/ptp/ptp_fc3.c
48
*sub_ns = idtfc3->ns_per_sync - rem - 1;
drivers/ptp/ptp_fc3.c
481
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
484
mutex_lock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
485
err = _idtfc3_adjphase(idtfc3, delta);
drivers/ptp/ptp_fc3.c
486
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
491
static int _idtfc3_adjfine(struct idtfc3 *idtfc3, long scaled_ppm)
drivers/ptp/ptp_fc3.c
497
err = idtfc3_set_lpf_mode(idtfc3, LPF_WF);
drivers/ptp/ptp_fc3.c
51
return sync * idtfc3->ns_per_sync;
drivers/ptp/ptp_fc3.c
519
return regmap_bulk_write(idtfc3->regmap, LPF_WR_FREQ_CTRL, buf, sizeof(buf));
drivers/ptp/ptp_fc3.c
524
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
527
mutex_lock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
528
err = _idtfc3_adjfine(idtfc3, scaled_ppm);
drivers/ptp/ptp_fc3.c
529
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
537
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
54
static s64 tdc_meas2offset(struct idtfc3 *idtfc3, u64 meas_read)
drivers/ptp/ptp_fc3.c
540
mutex_lock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
558
err = idtfc3_enable_tdc(idtfc3, true, CONTINUOUS);
drivers/ptp/ptp_fc3.c
560
err = idtfc3_enable_tdc(idtfc3, false, MEAS_MODE_INVALID);
drivers/ptp/ptp_fc3.c
566
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
569
dev_err(idtfc3->dev, "Failed in %s with err %d!", __func__, err);
drivers/ptp/ptp_fc3.c
576
struct idtfc3 *idtfc3 = container_of(ptp, struct idtfc3, caps);
drivers/ptp/ptp_fc3.c
579
mutex_lock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
582
idtfc3_timecounter_read(idtfc3);
drivers/ptp/ptp_fc3.c
583
get_tdc_meas_continuous(idtfc3);
drivers/ptp/ptp_fc3.c
585
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
587
return idtfc3->tc_update_period;
drivers/ptp/ptp_fc3.c
605
static int idtfc3_hw_calibrate(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
61
fine = div64_s64(fine * NSEC_PER_SEC, idtfc3->tdc_apll_freq * 62LL);
drivers/ptp/ptp_fc3.c
618
err = regmap_bulk_write(idtfc3->regmap, TDC_CTRL,
drivers/ptp/ptp_fc3.c
62
coarse = div64_s64(coarse * NSEC_PER_SEC, idtfc3->time_ref_freq);
drivers/ptp/ptp_fc3.c
623
err = regmap_bulk_write(idtfc3->regmap, TDC_CTRL,
drivers/ptp/ptp_fc3.c
635
err = regmap_bulk_write(idtfc3->regmap, SOFT_RESET_CTRL,
drivers/ptp/ptp_fc3.c
640
err = regmap_bulk_write(idtfc3->regmap, SOFT_RESET_CTRL,
drivers/ptp/ptp_fc3.c
649
static int idtfc3_init_timecounter(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
654
period_ms = idtfc3->sub_sync_count * MSEC_PER_SEC /
drivers/ptp/ptp_fc3.c
655
idtfc3->hw_param.time_clk_freq;
drivers/ptp/ptp_fc3.c
657
idtfc3->tc_update_period = msecs_to_jiffies(period_ms / TDC_GET_PERIOD);
drivers/ptp/ptp_fc3.c
658
idtfc3->tc_write_timeout = period_ms * USEC_PER_MSEC;
drivers/ptp/ptp_fc3.c
660
err = idtfc3_timecounter_update(idtfc3, 0, 0);
drivers/ptp/ptp_fc3.c
664
err = idtfc3_timecounter_read(idtfc3);
drivers/ptp/ptp_fc3.c
668
ptp_schedule_worker(idtfc3->ptp_clock, idtfc3->tc_update_period);
drivers/ptp/ptp_fc3.c
67
static s64 tdc_offset2phase(struct idtfc3 *idtfc3, s64 offset_ns)
drivers/ptp/ptp_fc3.c
673
static int idtfc3_get_tdc_apll_freq(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
678
struct idtfc3_hw_param *param = &idtfc3->hw_param;
drivers/ptp/ptp_fc3.c
680
err = regmap_bulk_read(idtfc3->regmap, TDC_REF_DIV_CNFG,
drivers/ptp/ptp_fc3.c
685
err = regmap_bulk_read(idtfc3->regmap, TDC_FB_DIV_INT_CNFG,
drivers/ptp/ptp_fc3.c
69
if (offset_ns > idtfc3->ns_per_sync / 2)
drivers/ptp/ptp_fc3.c
693
idtfc3->tdc_apll_freq = div_u64(param->xtal_freq * (u64)tdc_fb_div_int,
drivers/ptp/ptp_fc3.c
699
static int idtfc3_get_fod(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
70
offset_ns -= idtfc3->ns_per_sync;
drivers/ptp/ptp_fc3.c
704
err = regmap_bulk_read(idtfc3->regmap, TIME_CLOCK_SRC, &fod, sizeof(fod));
drivers/ptp/ptp_fc3.c
710
idtfc3->fod_n = FOD_0;
drivers/ptp/ptp_fc3.c
713
idtfc3->fod_n = FOD_1;
drivers/ptp/ptp_fc3.c
716
idtfc3->fod_n = FOD_2;
drivers/ptp/ptp_fc3.c
72
return offset_ns * idtfc3->tdc_offset_sign;
drivers/ptp/ptp_fc3.c
725
static int idtfc3_get_sync_count(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
730
err = regmap_bulk_read(idtfc3->regmap, SUB_SYNC_GEN_CNFG, buf, sizeof(buf));
drivers/ptp/ptp_fc3.c
734
idtfc3->sub_sync_count = (get_unaligned_le32(buf) & SUB_SYNC_COUNTER_MASK) + 1;
drivers/ptp/ptp_fc3.c
735
idtfc3->ns_per_counter = NSEC_PER_SEC / idtfc3->hw_param.time_clk_freq;
drivers/ptp/ptp_fc3.c
736
idtfc3->ns_per_sync = idtfc3->sub_sync_count * idtfc3->ns_per_counter;
drivers/ptp/ptp_fc3.c
741
static int idtfc3_setup_hw_param(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
745
err = idtfc3_get_fod(idtfc3);
drivers/ptp/ptp_fc3.c
749
err = idtfc3_get_sync_count(idtfc3);
drivers/ptp/ptp_fc3.c
75
static int idtfc3_set_lpf_mode(struct idtfc3 *idtfc3, u8 mode)
drivers/ptp/ptp_fc3.c
753
err = idtfc3_get_time_ref_freq(idtfc3);
drivers/ptp/ptp_fc3.c
757
return idtfc3_get_tdc_apll_freq(idtfc3);
drivers/ptp/ptp_fc3.c
760
static int idtfc3_configure_hw(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
764
err = idtfc3_hw_calibrate(idtfc3);
drivers/ptp/ptp_fc3.c
768
err = idtfc3_enable_lpf(idtfc3, true);
drivers/ptp/ptp_fc3.c
772
err = idtfc3_enable_tdc(idtfc3, false, MEAS_MODE_INVALID);
drivers/ptp/ptp_fc3.c
776
err = idtfc3_get_tdc_offset_sign(idtfc3);
drivers/ptp/ptp_fc3.c
780
return idtfc3_setup_hw_param(idtfc3);
drivers/ptp/ptp_fc3.c
783
static int idtfc3_set_overhead(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
798
err = regmap_bulk_write(idtfc3->regmap, TOD_SYNC_LOAD_VAL_CTRL,
drivers/ptp/ptp_fc3.c
817
idtfc3->tod_write_overhead = lowest_ns;
drivers/ptp/ptp_fc3.c
82
if (idtfc3->lpf_mode == mode)
drivers/ptp/ptp_fc3.c
822
static int idtfc3_enable_ptp(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
826
idtfc3->caps = idtfc3_caps;
drivers/ptp/ptp_fc3.c
827
snprintf(idtfc3->caps.name, sizeof(idtfc3->caps.name), "IDT FC3W");
drivers/ptp/ptp_fc3.c
828
idtfc3->ptp_clock = ptp_clock_register(&idtfc3->caps, NULL);
drivers/ptp/ptp_fc3.c
830
if (IS_ERR(idtfc3->ptp_clock)) {
drivers/ptp/ptp_fc3.c
831
err = PTR_ERR(idtfc3->ptp_clock);
drivers/ptp/ptp_fc3.c
832
idtfc3->ptp_clock = NULL;
drivers/ptp/ptp_fc3.c
836
err = idtfc3_set_overhead(idtfc3);
drivers/ptp/ptp_fc3.c
840
err = idtfc3_init_timecounter(idtfc3);
drivers/ptp/ptp_fc3.c
844
dev_info(idtfc3->dev, "TIME_SYNC_CHANNEL registered as ptp%d",
drivers/ptp/ptp_fc3.c
845
idtfc3->ptp_clock->index);
drivers/ptp/ptp_fc3.c
85
err = regmap_bulk_write(idtfc3->regmap, LPF_MODE_CNFG, &mode, sizeof(mode));
drivers/ptp/ptp_fc3.c
850
static int idtfc3_load_firmware(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
860
idtfc3_default_hw_param(&idtfc3->hw_param);
drivers/ptp/ptp_fc3.c
865
dev_info(idtfc3->dev, "requesting firmware '%s'\n", fname);
drivers/ptp/ptp_fc3.c
867
err = request_firmware(&fw, fname, idtfc3->dev);
drivers/ptp/ptp_fc3.c
870
dev_err(idtfc3->dev,
drivers/ptp/ptp_fc3.c
875
dev_dbg(idtfc3->dev, "firmware size %zu bytes\n", fw->size);
drivers/ptp/ptp_fc3.c
881
dev_err(idtfc3->dev,
drivers/ptp/ptp_fc3.c
89
idtfc3->lpf_mode = mode;
drivers/ptp/ptp_fc3.c
890
err = idtfc3_set_hw_param(&idtfc3->hw_param, addr, val);
drivers/ptp/ptp_fc3.c
900
err = regmap_bulk_write(idtfc3->regmap, addr,
drivers/ptp/ptp_fc3.c
908
err = idtfc3_configure_hw(idtfc3);
drivers/ptp/ptp_fc3.c
914
static int idtfc3_read_device_id(struct idtfc3 *idtfc3, u16 *device_id)
drivers/ptp/ptp_fc3.c
919
err = regmap_bulk_read(idtfc3->regmap, DEVICE_ID,
drivers/ptp/ptp_fc3.c
922
dev_err(idtfc3->dev, "%s failed with %d", __func__, err);
drivers/ptp/ptp_fc3.c
931
static int idtfc3_check_device_compatibility(struct idtfc3 *idtfc3)
drivers/ptp/ptp_fc3.c
936
err = idtfc3_read_device_id(idtfc3, &device_id);
drivers/ptp/ptp_fc3.c
94
static int idtfc3_enable_lpf(struct idtfc3 *idtfc3, bool enable)
drivers/ptp/ptp_fc3.c
941
dev_err(idtfc3->dev, "invalid device");
drivers/ptp/ptp_fc3.c
951
struct idtfc3 *idtfc3;
drivers/ptp/ptp_fc3.c
954
idtfc3 = devm_kzalloc(&pdev->dev, sizeof(struct idtfc3), GFP_KERNEL);
drivers/ptp/ptp_fc3.c
956
if (!idtfc3)
drivers/ptp/ptp_fc3.c
959
idtfc3->dev = &pdev->dev;
drivers/ptp/ptp_fc3.c
960
idtfc3->mfd = pdev->dev.parent;
drivers/ptp/ptp_fc3.c
961
idtfc3->lock = &ddata->lock;
drivers/ptp/ptp_fc3.c
962
idtfc3->regmap = ddata->regmap;
drivers/ptp/ptp_fc3.c
964
mutex_lock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
966
err = idtfc3_check_device_compatibility(idtfc3);
drivers/ptp/ptp_fc3.c
968
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
972
err = idtfc3_load_firmware(idtfc3);
drivers/ptp/ptp_fc3.c
975
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
978
dev_warn(idtfc3->dev, "loading firmware failed with %d", err);
drivers/ptp/ptp_fc3.c
981
err = idtfc3_enable_ptp(idtfc3);
drivers/ptp/ptp_fc3.c
983
dev_err(idtfc3->dev, "idtfc3_enable_ptp failed with %d", err);
drivers/ptp/ptp_fc3.c
984
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
988
mutex_unlock(idtfc3->lock);
drivers/ptp/ptp_fc3.c
99
err = regmap_bulk_read(idtfc3->regmap, LPF_CTRL, &val, sizeof(val));
drivers/ptp/ptp_fc3.c
990
platform_set_drvdata(pdev, idtfc3);
drivers/ptp/ptp_fc3.c
997
struct idtfc3 *idtfc3 = platform_get_drvdata(pdev);
drivers/ptp/ptp_fc3.c
999
ptp_clock_unregister(idtfc3->ptp_clock);