0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef TS2020_H
0011 #define TS2020_H
0012
0013 #include <linux/dvb/frontend.h>
0014
0015 struct ts2020_config {
0016 u8 tuner_address;
0017 u32 frequency_div;
0018
0019
0020
0021
0022 bool loop_through:1;
0023
0024
0025
0026
0027 #define TS2020_CLK_OUT_DISABLED 0
0028 #define TS2020_CLK_OUT_ENABLED 1
0029 #define TS2020_CLK_OUT_ENABLED_XTALOUT 2
0030 u8 clk_out:2;
0031
0032
0033
0034
0035
0036 u8 clk_out_div:5;
0037
0038
0039 bool dont_poll:1;
0040
0041
0042
0043
0044 struct dvb_frontend *fe;
0045
0046
0047
0048
0049 u8 attach_in_use:1;
0050
0051
0052
0053
0054 int (*get_agc_pwm)(struct dvb_frontend *fe, u8 *_agc_pwm);
0055 };
0056
0057
0058 #if IS_REACHABLE(CONFIG_DVB_TS2020)
0059 extern struct dvb_frontend *ts2020_attach(
0060 struct dvb_frontend *fe,
0061 const struct ts2020_config *config,
0062 struct i2c_adapter *i2c);
0063 #else
0064 static inline struct dvb_frontend *ts2020_attach(
0065 struct dvb_frontend *fe,
0066 const struct ts2020_config *config,
0067 struct i2c_adapter *i2c)
0068 {
0069 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0070 return NULL;
0071 }
0072 #endif
0073
0074 #endif