xref: /linux/drivers/dpll/zl3073x/dpll.h (revision 8a2a6bb01664c34464153b6ace79a6da34e63eaa)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _ZL3073X_DPLL_H
4 #define _ZL3073X_DPLL_H
5 
6 #include <linux/dpll.h>
7 #include <linux/list.h>
8 
9 #include "core.h"
10 
11 /**
12  * struct zl3073x_dpll - ZL3073x DPLL sub-device structure
13  * @list: this DPLL list entry
14  * @dev: pointer to multi-function parent device
15  * @id: DPLL index
16  * @refsel_mode: reference selection mode
17  * @forced_ref: selected reference in forced reference lock mode
18  * @dpll_dev: pointer to registered DPLL device
19  * @lock_status: last saved DPLL lock status
20  * @pins: list of pins
21  */
22 struct zl3073x_dpll {
23 	struct list_head		list;
24 	struct zl3073x_dev		*dev;
25 	u8				id;
26 	u8				refsel_mode;
27 	u8				forced_ref;
28 	struct dpll_device		*dpll_dev;
29 	enum dpll_lock_status		lock_status;
30 	struct list_head		pins;
31 };
32 
33 struct zl3073x_dpll *zl3073x_dpll_alloc(struct zl3073x_dev *zldev, u8 ch);
34 void zl3073x_dpll_free(struct zl3073x_dpll *zldpll);
35 
36 int zl3073x_dpll_register(struct zl3073x_dpll *zldpll);
37 void zl3073x_dpll_unregister(struct zl3073x_dpll *zldpll);
38 
39 int zl3073x_dpll_init_fine_phase_adjust(struct zl3073x_dev *zldev);
40 void zl3073x_dpll_changes_check(struct zl3073x_dpll *zldpll);
41 
42 #endif /* _ZL3073X_DPLL_H */
43