Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / media / tuners / r820t.h
blob6709a0da9940def9c3cf7633c1ef611d8b74da8d
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Elonics R820T silicon tuner driver
5 * Copyright (C) 2012 Antti Palosaari <crope@iki.fi>
6 */
8 #ifndef R820T_H
9 #define R820T_H
11 #include <media/dvb_frontend.h>
13 enum r820t_chip {
14 CHIP_R820T,
15 CHIP_R620D,
16 CHIP_R828D,
17 CHIP_R828,
18 CHIP_R828S,
19 CHIP_R820C,
22 struct r820t_config {
23 u8 i2c_addr; /* 0x34 */
24 u32 xtal;
25 enum r820t_chip rafael_chip;
26 unsigned max_i2c_msg_len;
27 bool use_diplexer;
28 bool use_predetect;
31 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_R820T)
32 struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
33 struct i2c_adapter *i2c,
34 const struct r820t_config *cfg);
35 #else
36 static inline struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
37 struct i2c_adapter *i2c,
38 const struct r820t_config *cfg)
40 pr_warn("%s: driver disabled by Kconfig\n", __func__);
41 return NULL;
43 #endif
45 #endif