0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef TDA1002x_H
0013 #define TDA1002x_H
0014
0015 #include <linux/dvb/frontend.h>
0016
0017 struct tda1002x_config {
0018
0019 u8 demod_address;
0020 u8 invert;
0021 };
0022
0023 enum tda10023_output_mode {
0024 TDA10023_OUTPUT_MODE_PARALLEL_A = 0xe0,
0025 TDA10023_OUTPUT_MODE_PARALLEL_B = 0xa1,
0026 TDA10023_OUTPUT_MODE_PARALLEL_C = 0xa0,
0027 TDA10023_OUTPUT_MODE_SERIAL,
0028 };
0029
0030 struct tda10023_config {
0031
0032 u8 demod_address;
0033 u8 invert;
0034
0035
0036 u32 xtal;
0037 u8 pll_m;
0038 u8 pll_p;
0039 u8 pll_n;
0040
0041
0042 u8 output_mode;
0043
0044
0045 u16 deltaf;
0046 };
0047
0048 #if IS_REACHABLE(CONFIG_DVB_TDA10021)
0049 extern struct dvb_frontend* tda10021_attach(const struct tda1002x_config* config,
0050 struct i2c_adapter* i2c, u8 pwm);
0051 #else
0052 static inline struct dvb_frontend* tda10021_attach(const struct tda1002x_config* config,
0053 struct i2c_adapter* i2c, u8 pwm)
0054 {
0055 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0056 return NULL;
0057 }
0058 #endif
0059
0060 #if IS_REACHABLE(CONFIG_DVB_TDA10023)
0061 extern struct dvb_frontend *tda10023_attach(
0062 const struct tda10023_config *config,
0063 struct i2c_adapter *i2c, u8 pwm);
0064 #else
0065 static inline struct dvb_frontend *tda10023_attach(
0066 const struct tda10023_config *config,
0067 struct i2c_adapter *i2c, u8 pwm)
0068 {
0069 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0070 return NULL;
0071 }
0072 #endif
0073
0074 #endif