1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef __MXL111SF_TUNER_H__
22#define __MXL111SF_TUNER_H__
23
24#include <linux/kconfig.h>
25#include "dvb_frontend.h"
26#include "mxl111sf.h"
27
28enum mxl_if_freq {
29#if 0
30 MXL_IF_LO = 0x00,
31#endif
32 MXL_IF_4_0 = 0x01,
33 MXL_IF_4_5 = 0x02,
34 MXL_IF_4_57 = 0x03,
35 MXL_IF_5_0 = 0x04,
36 MXL_IF_5_38 = 0x05,
37 MXL_IF_6_0 = 0x06,
38 MXL_IF_6_28 = 0x07,
39 MXL_IF_7_2 = 0x08,
40 MXL_IF_35_25 = 0x09,
41 MXL_IF_36 = 0x0a,
42 MXL_IF_36_15 = 0x0b,
43 MXL_IF_44 = 0x0c,
44#if 0
45 MXL_IF_HI = 0x0f,
46#endif
47};
48
49struct mxl111sf_tuner_config {
50 enum mxl_if_freq if_freq;
51 unsigned int invert_spectrum:1;
52
53 int (*read_reg)(struct mxl111sf_state *state, u8 addr, u8 *data);
54 int (*write_reg)(struct mxl111sf_state *state, u8 addr, u8 data);
55 int (*program_regs)(struct mxl111sf_state *state,
56 struct mxl111sf_reg_ctrl_info *ctrl_reg_info);
57 int (*top_master_ctrl)(struct mxl111sf_state *state, int onoff);
58 int (*ant_hunt)(struct dvb_frontend *fe);
59};
60
61
62
63#if IS_ENABLED(CONFIG_DVB_USB_MXL111SF)
64extern
65struct dvb_frontend *mxl111sf_tuner_attach(struct dvb_frontend *fe,
66 struct mxl111sf_state *mxl_state,
67 struct mxl111sf_tuner_config *cfg);
68#else
69static inline
70struct dvb_frontend *mxl111sf_tuner_attach(struct dvb_frontend *fe,
71 struct mxl111sf_state *mxl_state
72 struct mxl111sf_tuner_config *cfg)
73{
74 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
75 return NULL;
76}
77#endif
78
79#endif
80
81
82
83
84
85
86
87
88
89