Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / media / dvb-frontends / mxl5xx.h
blob139e16b2ecfce27ed30d70f9973ddbd5698e7fb2
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Driver for the MaxLinear MxL5xx family of tuners/demods
5 * Copyright (C) 2014-2015 Ralph Metzler <rjkm@metzlerbros.de>
6 * Marcus Metzler <mocm@metzlerbros.de>
7 * developed for Digital Devices GmbH
9 * based on code:
10 * Copyright (c) 2011-2013 MaxLinear, Inc. All rights reserved
11 * which was released under GPL V2
14 #ifndef _MXL5XX_H_
15 #define _MXL5XX_H_
17 #include <linux/types.h>
18 #include <linux/i2c.h>
20 #include <media/dvb_frontend.h>
22 struct mxl5xx_cfg {
23 u8 adr;
24 u8 type;
25 u32 cap;
26 u32 clk;
27 u32 ts_clk;
29 u8 *fw;
30 u32 fw_len;
32 int (*fw_read)(void *priv, u8 *buf, u32 len);
33 void *fw_priv;
36 #if IS_REACHABLE(CONFIG_DVB_MXL5XX)
38 extern struct dvb_frontend *mxl5xx_attach(struct i2c_adapter *i2c,
39 struct mxl5xx_cfg *cfg, u32 demod, u32 tuner,
40 int (**fn_set_input)(struct dvb_frontend *, int));
42 #else
44 static inline struct dvb_frontend *mxl5xx_attach(struct i2c_adapter *i2c,
45 struct mxl5xx_cfg *cfg, u32 demod, u32 tuner,
46 int (**fn_set_input)(struct dvb_frontend *, int))
48 pr_warn("%s: driver disabled by Kconfig\n", __func__);
49 return NULL;
52 #endif /* CONFIG_DVB_MXL5XX */
54 #endif /* _MXL5XX_H_ */