1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef _AF9013_H_
25#define _AF9013_H_
26
27#include <linux/dvb/frontend.h>
28
29enum af9013_ts_mode {
30 AF9013_OUTPUT_MODE_PARALLEL,
31 AF9013_OUTPUT_MODE_SERIAL,
32 AF9013_OUTPUT_MODE_USB,
33};
34
35enum af9013_tuner {
36 AF9013_TUNER_MXL5003D = 3,
37 AF9013_TUNER_MXL5005D = 13,
38 AF9013_TUNER_MXL5005R = 30,
39 AF9013_TUNER_ENV77H11D5 = 129,
40 AF9013_TUNER_MT2060 = 130,
41 AF9013_TUNER_MC44S803 = 133,
42 AF9013_TUNER_QT1010 = 134,
43 AF9013_TUNER_UNKNOWN = 140,
44 AF9013_TUNER_MT2060_2 = 147,
45 AF9013_TUNER_TDA18271 = 156,
46 AF9013_TUNER_QT1010A = 162,
47 AF9013_TUNER_MXL5007T = 177,
48 AF9013_TUNER_TDA18218 = 179,
49};
50
51
52
53
54
55
56
57
58#define AF9013_GPIO_ON (1 << 0)
59#define AF9013_GPIO_EN (1 << 1)
60#define AF9013_GPIO_O (1 << 2)
61#define AF9013_GPIO_I (1 << 3)
62
63#define AF9013_GPIO_LO (AF9013_GPIO_ON|AF9013_GPIO_EN)
64#define AF9013_GPIO_HI (AF9013_GPIO_ON|AF9013_GPIO_EN|AF9013_GPIO_O)
65
66#define AF9013_GPIO_TUNER_ON (AF9013_GPIO_ON|AF9013_GPIO_EN)
67#define AF9013_GPIO_TUNER_OFF (AF9013_GPIO_ON|AF9013_GPIO_EN|AF9013_GPIO_O)
68
69struct af9013_config {
70
71 u8 demod_address;
72
73
74 u32 adc_clock;
75
76
77 u8 tuner;
78
79
80 u16 tuner_if;
81
82
83 u8 output_mode:2;
84
85
86 u8 rf_spec_inv:1;
87
88
89 u8 api_version[4];
90
91
92 u8 gpio[4];
93};
94
95
96#if defined(CONFIG_DVB_AF9013) || \
97 (defined(CONFIG_DVB_AF9013_MODULE) && defined(MODULE))
98extern struct dvb_frontend *af9013_attach(const struct af9013_config *config,
99 struct i2c_adapter *i2c);
100#else
101static inline struct dvb_frontend *af9013_attach(
102const struct af9013_config *config, struct i2c_adapter *i2c)
103{
104 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
105 return NULL;
106}
107#endif
108
109#endif
110