0001
0002
0003
0004
0005
0006
0007
0008 #ifndef LGDT330X_H
0009 #define LGDT330X_H
0010
0011 #include <linux/dvb/frontend.h>
0012
0013 typedef enum lg_chip_t {
0014 UNDEFINED,
0015 LGDT3302,
0016 LGDT3303
0017 }lg_chip_type;
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 struct lgdt330x_config
0035 {
0036 lg_chip_type demod_chip;
0037 int serial_mpeg;
0038 int (*pll_rf_set) (struct dvb_frontend* fe, int index);
0039 int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured);
0040 int clock_polarity_flip;
0041
0042 struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
0043 };
0044
0045 #if IS_REACHABLE(CONFIG_DVB_LGDT330X)
0046 struct dvb_frontend *lgdt330x_attach(const struct lgdt330x_config *config,
0047 u8 demod_address,
0048 struct i2c_adapter *i2c);
0049 #else
0050 static inline
0051 struct dvb_frontend *lgdt330x_attach(const struct lgdt330x_config *config,
0052 u8 demod_address,
0053 struct i2c_adapter *i2c)
0054 {
0055 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0056 return NULL;
0057 }
0058 #endif
0059
0060 #endif