0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #ifndef MT352_H
0020 #define MT352_H
0021
0022 #include <linux/dvb/frontend.h>
0023
0024 struct mt352_config
0025 {
0026
0027 u8 demod_address;
0028
0029
0030 int adc_clock;
0031 int if2;
0032
0033
0034 int no_tuner;
0035
0036
0037 int (*demod_init)(struct dvb_frontend* fe);
0038 };
0039
0040 #if IS_REACHABLE(CONFIG_DVB_MT352)
0041 extern struct dvb_frontend* mt352_attach(const struct mt352_config* config,
0042 struct i2c_adapter* i2c);
0043 #else
0044 static inline struct dvb_frontend* mt352_attach(const struct mt352_config* config,
0045 struct i2c_adapter* i2c)
0046 {
0047 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0048 return NULL;
0049 }
0050 #endif
0051
0052 static inline int mt352_write(struct dvb_frontend *fe, const u8 buf[], int len) {
0053 int r = 0;
0054 if (fe->ops.write)
0055 r = fe->ops.write(fe, buf, len);
0056 return r;
0057 }
0058
0059 #endif