0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _MXL5XX_H_
0015 #define _MXL5XX_H_
0016
0017 #include <linux/types.h>
0018 #include <linux/i2c.h>
0019
0020 #include <media/dvb_frontend.h>
0021
0022 struct mxl5xx_cfg {
0023 u8 adr;
0024 u8 type;
0025 u32 cap;
0026 u32 clk;
0027 u32 ts_clk;
0028
0029 u8 *fw;
0030 u32 fw_len;
0031
0032 int (*fw_read)(void *priv, u8 *buf, u32 len);
0033 void *fw_priv;
0034 };
0035
0036 #if IS_REACHABLE(CONFIG_DVB_MXL5XX)
0037
0038 extern struct dvb_frontend *mxl5xx_attach(struct i2c_adapter *i2c,
0039 struct mxl5xx_cfg *cfg, u32 demod, u32 tuner,
0040 int (**fn_set_input)(struct dvb_frontend *, int));
0041
0042 #else
0043
0044 static inline struct dvb_frontend *mxl5xx_attach(struct i2c_adapter *i2c,
0045 struct mxl5xx_cfg *cfg, u32 demod, u32 tuner,
0046 int (**fn_set_input)(struct dvb_frontend *, int))
0047 {
0048 pr_warn("%s: driver disabled by Kconfig\n", __func__);
0049 return NULL;
0050 }
0051
0052 #endif
0053
0054 #endif