1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef R820T_H
22#define R820T_H
23
24#include <linux/kconfig.h>
25#include "dvb_frontend.h"
26
27enum r820t_chip {
28 CHIP_R820T,
29 CHIP_R620D,
30 CHIP_R828D,
31 CHIP_R828,
32 CHIP_R828S,
33 CHIP_R820C,
34};
35
36struct r820t_config {
37 u8 i2c_addr;
38 u32 xtal;
39 enum r820t_chip rafael_chip;
40 unsigned max_i2c_msg_len;
41 bool use_diplexer;
42 bool use_predetect;
43};
44
45#if IS_ENABLED(CONFIG_MEDIA_TUNER_R820T)
46struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
47 struct i2c_adapter *i2c,
48 const struct r820t_config *cfg);
49#else
50static inline struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
51 struct i2c_adapter *i2c,
52 const struct r820t_config *cfg)
53{
54 pr_warn("%s: driver disabled by Kconfig\n", __func__);
55 return NULL;
56}
57#endif
58
59#endif
60