1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef __MXL5007T_H__
22#define __MXL5007T_H__
23
24#include "dvb_frontend.h"
25
26
27
28enum mxl5007t_if_freq {
29 MxL_IF_4_MHZ,
30 MxL_IF_4_5_MHZ,
31 MxL_IF_4_57_MHZ,
32 MxL_IF_5_MHZ,
33 MxL_IF_5_38_MHZ,
34 MxL_IF_6_MHZ,
35 MxL_IF_6_28_MHZ,
36 MxL_IF_9_1915_MHZ,
37 MxL_IF_35_25_MHZ,
38 MxL_IF_36_15_MHZ,
39 MxL_IF_44_MHZ,
40};
41
42enum mxl5007t_xtal_freq {
43 MxL_XTAL_16_MHZ,
44 MxL_XTAL_20_MHZ,
45 MxL_XTAL_20_25_MHZ,
46 MxL_XTAL_20_48_MHZ,
47 MxL_XTAL_24_MHZ,
48 MxL_XTAL_25_MHZ,
49 MxL_XTAL_25_14_MHZ,
50 MxL_XTAL_27_MHZ,
51 MxL_XTAL_28_8_MHZ,
52 MxL_XTAL_32_MHZ,
53 MxL_XTAL_40_MHZ,
54 MxL_XTAL_44_MHZ,
55 MxL_XTAL_48_MHZ,
56 MxL_XTAL_49_3811_MHZ,
57};
58
59enum mxl5007t_clkout_amp {
60 MxL_CLKOUT_AMP_0_94V = 0,
61 MxL_CLKOUT_AMP_0_53V = 1,
62 MxL_CLKOUT_AMP_0_37V = 2,
63 MxL_CLKOUT_AMP_0_28V = 3,
64 MxL_CLKOUT_AMP_0_23V = 4,
65 MxL_CLKOUT_AMP_0_20V = 5,
66 MxL_CLKOUT_AMP_0_17V = 6,
67 MxL_CLKOUT_AMP_0_15V = 7,
68};
69
70struct mxl5007t_config {
71 s32 if_diff_out_level;
72 enum mxl5007t_clkout_amp clk_out_amp;
73 enum mxl5007t_xtal_freq xtal_freq_hz;
74 enum mxl5007t_if_freq if_freq_hz;
75 unsigned int invert_if:1;
76 unsigned int loop_thru_enable:1;
77 unsigned int clk_out_enable:1;
78};
79
80#if IS_ENABLED(CONFIG_MEDIA_TUNER_MXL5007T)
81extern struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
82 struct i2c_adapter *i2c, u8 addr,
83 struct mxl5007t_config *cfg);
84#else
85static inline struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
86 struct i2c_adapter *i2c,
87 u8 addr,
88 struct mxl5007t_config *cfg)
89{
90 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
91 return NULL;
92}
93#endif
94
95#endif
96