File: ptp_fc3.h

package info (click to toggle)
linux 6.12.43-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,676,260 kB
  • sloc: ansic: 25,921,022; asm: 269,579; sh: 136,424; python: 65,440; makefile: 55,721; perl: 37,752; xml: 19,284; cpp: 5,895; yacc: 4,927; lex: 2,939; awk: 1,594; sed: 28; ruby: 25
file content (45 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download | duplicates (23)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * PTP hardware clock driver for the FemtoClock3 family of timing and
 * synchronization devices.
 *
 * Copyright (C) 2023 Integrated Device Technology, Inc., a Renesas Company.
 */
#ifndef PTP_IDTFC3_H
#define PTP_IDTFC3_H

#include <linux/ktime.h>
#include <linux/ptp_clock.h>
#include <linux/regmap.h>

#define FW_FILENAME	"idtfc3.bin"

#define MAX_FFO_PPB	(244000)
#define TDC_GET_PERIOD	(10)

struct idtfc3 {
	struct ptp_clock_info	caps;
	struct ptp_clock	*ptp_clock;
	struct device		*dev;
	/* Mutex to protect operations from being interrupted */
	struct mutex		*lock;
	struct device		*mfd;
	struct regmap		*regmap;
	struct idtfc3_hw_param	hw_param;
	u32			sub_sync_count;
	u32			ns_per_sync;
	int			tdc_offset_sign;
	u64			tdc_apll_freq;
	u32			time_ref_freq;
	u16			fod_n;
	u8			lpf_mode;
	/* Time counter */
	u32			last_counter;
	s64			ns;
	u32			ns_per_counter;
	u32			tc_update_period;
	u32			tc_write_timeout;
	s64			tod_write_overhead;
};

#endif /* PTP_IDTFC3_H */