Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Elonics R820T silicon tuner driver
0004  *
0005  * Copyright (C) 2012 Antti Palosaari <crope@iki.fi>
0006  */
0007 
0008 #ifndef R820T_H
0009 #define R820T_H
0010 
0011 #include <media/dvb_frontend.h>
0012 
0013 enum r820t_chip {
0014     CHIP_R820T,
0015     CHIP_R620D,
0016     CHIP_R828D,
0017     CHIP_R828,
0018     CHIP_R828S,
0019     CHIP_R820C,
0020 };
0021 
0022 struct r820t_config {
0023     u8 i2c_addr;        /* 0x34 */
0024     u32 xtal;
0025     enum r820t_chip rafael_chip;
0026     unsigned max_i2c_msg_len;
0027     bool use_diplexer;
0028     bool use_predetect;
0029 };
0030 
0031 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_R820T)
0032 struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
0033                   struct i2c_adapter *i2c,
0034                   const struct r820t_config *cfg);
0035 #else
0036 static inline struct dvb_frontend *r820t_attach(struct dvb_frontend *fe,
0037                         struct i2c_adapter *i2c,
0038                         const struct r820t_config *cfg)
0039 {
0040     pr_warn("%s: driver disabled by Kconfig\n", __func__);
0041     return NULL;
0042 }
0043 #endif
0044 
0045 #endif