0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef CX24120_H
0012 #define CX24120_H
0013
0014 #include <linux/dvb/frontend.h>
0015 #include <linux/firmware.h>
0016
0017 struct cx24120_initial_mpeg_config {
0018 u8 x1;
0019 u8 x2;
0020 u8 x3;
0021 };
0022
0023 struct cx24120_config {
0024 u8 i2c_addr;
0025 u32 xtal_khz;
0026 struct cx24120_initial_mpeg_config initial_mpeg_config;
0027
0028 int (*request_firmware)(struct dvb_frontend *fe,
0029 const struct firmware **fw, char *name);
0030
0031
0032 u16 i2c_wr_max;
0033 };
0034
0035 #if IS_REACHABLE(CONFIG_DVB_CX24120)
0036 struct dvb_frontend *cx24120_attach(const struct cx24120_config *config,
0037 struct i2c_adapter *i2c);
0038 #else
0039 static inline
0040 struct dvb_frontend *cx24120_attach(const struct cx24120_config *config,
0041 struct i2c_adapter *i2c)
0042 {
0043 pr_warn("%s: driver disabled by Kconfig\n", __func__);
0044 return NULL;
0045 }
0046 #endif
0047
0048 #endif