This source file includes following definitions.
- stv0299_attach
- stv0299_writereg
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 #ifndef STV0299_H
34 #define STV0299_H
35
36 #include <linux/dvb/frontend.h>
37 #include <media/dvb_frontend.h>
38
39 #define STV0299_LOCKOUTPUT_0 0
40 #define STV0299_LOCKOUTPUT_1 1
41 #define STV0299_LOCKOUTPUT_CF 2
42 #define STV0299_LOCKOUTPUT_LK 3
43
44 #define STV0299_VOLT13_OP0 0
45 #define STV0299_VOLT13_OP1 1
46
47 struct stv0299_config
48 {
49
50 u8 demod_address;
51
52
53
54
55
56 const u8* inittab;
57
58
59 u32 mclk;
60
61
62 u8 invert:1;
63
64
65 u8 skip_reinit:1;
66
67
68 u8 lock_output:2;
69
70
71 u8 volt13_op0_op1:1;
72
73
74 u8 op0_off:1;
75
76
77 int min_delay_ms;
78
79
80 int (*set_symbol_rate)(struct dvb_frontend *fe, u32 srate, u32 ratio);
81
82
83 int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
84 };
85
86 #if IS_REACHABLE(CONFIG_DVB_STV0299)
87 extern struct dvb_frontend *stv0299_attach(const struct stv0299_config *config,
88 struct i2c_adapter *i2c);
89 #else
90 static inline struct dvb_frontend *stv0299_attach(const struct stv0299_config *config,
91 struct i2c_adapter *i2c)
92 {
93 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
94 return NULL;
95 }
96 #endif
97
98 static inline int stv0299_writereg(struct dvb_frontend *fe, u8 reg, u8 val) {
99 int r = 0;
100 u8 buf[] = {reg, val};
101 if (fe->ops.write)
102 r = fe->ops.write(fe, buf, 2);
103 return r;
104 }
105
106 #endif