1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Elonics R820T silicon tuner driver
4 *
5 * Copyright (C) 2012 Antti Palosaari <crope@iki.fi>
6 */
7
8#ifndef R820T_H
9#define R820T_H
10
11#include <media/dvb_frontend.h>
12
13enum r820t_chip {
14 CHIP_R820T,
15 CHIP_R620D,
16 CHIP_R828D,
17 CHIP_R828,
18 CHIP_R828S,
19 CHIP_R820C,
20};
21
22struct 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;
29};
30
31#if IS_REACHABLE(CONFIG_MEDIA_TUNER_R820T)
32struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
33 struct i2c_adapter *i2c,
34 const struct r820t_config *cfg);
35#else
36static inline struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
37 struct i2c_adapter *i2c,
38 const struct r820t_config *cfg)
39{
40 pr_warn("%s: driver disabled by Kconfig\n", __func__);
41 return NULL;
42}
43#endif
44
45#endif
46

source code of linux/drivers/media/tuners/r820t.h