Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / media / dvb-frontends / mxl5xx.h
blob706a2f5d8f9737e20a99c2b98cd4aa6de4ff4827
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
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * version 2, as published by the Free Software Foundation.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
23 #ifndef _MXL5XX_H_
24 #define _MXL5XX_H_
26 #include <linux/types.h>
27 #include <linux/i2c.h>
29 #include <media/dvb_frontend.h>
31 struct mxl5xx_cfg {
32 u8 adr;
33 u8 type;
34 u32 cap;
35 u32 clk;
36 u32 ts_clk;
38 u8 *fw;
39 u32 fw_len;
41 int (*fw_read)(void *priv, u8 *buf, u32 len);
42 void *fw_priv;
45 #if IS_REACHABLE(CONFIG_DVB_MXL5XX)
47 extern struct dvb_frontend *mxl5xx_attach(struct i2c_adapter *i2c,
48 struct mxl5xx_cfg *cfg, u32 demod, u32 tuner,
49 int (**fn_set_input)(struct dvb_frontend *, int));
51 #else
53 static inline struct dvb_frontend *mxl5xx_attach(struct i2c_adapter *i2c,
54 struct mxl5xx_cfg *cfg, u32 demod, u32 tuner,
55 int (**fn_set_input)(struct dvb_frontend *, int))
57 pr_warn("%s: driver disabled by Kconfig\n", __func__);
58 return NULL;
61 #endif /* CONFIG_DVB_MXL5XX */
63 #endif /* _MXL5XX_H_ */