GNU Linux-libre 4.19.286-gnu1
[releases.git] / drivers / media / dvb-frontends / mxl5xx.h
1 #ifndef _MXL5XX_H_
2 #define _MXL5XX_H_
3
4 #include <linux/types.h>
5 #include <linux/i2c.h>
6
7 #include <media/dvb_frontend.h>
8
9 struct mxl5xx_cfg {
10         u8   adr;
11         u8   type;
12         u32  cap;
13         u32  clk;
14         u32  ts_clk;
15
16         u8  *fw;
17         u32  fw_len;
18
19         int (*fw_read)(void *priv, u8 *buf, u32 len);
20         void *fw_priv;
21 };
22
23 #if IS_REACHABLE(CONFIG_DVB_MXL5XX)
24
25 extern struct dvb_frontend *mxl5xx_attach(struct i2c_adapter *i2c,
26         struct mxl5xx_cfg *cfg, u32 demod, u32 tuner,
27         int (**fn_set_input)(struct dvb_frontend *, int));
28
29 #else
30
31 static inline struct dvb_frontend *mxl5xx_attach(struct i2c_adapter *i2c,
32         struct mxl5xx_cfg *cfg, u32 demod, u32 tuner,
33         int (**fn_set_input)(struct dvb_frontend *, int))
34 {
35         pr_warn("%s: driver disabled by Kconfig\n", __func__);
36         return NULL;
37 }
38
39 #endif /* CONFIG_DVB_MXL5XX */
40
41 #endif /* _MXL5XX_H_ */