1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Driver for the MaxLinear MxL5xx family of tuners/demods 4 * 5 * Copyright (C) 2014-2015 Ralph Metzler <rjkm@metzlerbros.de> 6 * Marcus Metzler <mocm@metzlerbros.de> 7 * developed for Digital Devices GmbH 8 * 9 * based on code: 10 * Copyright (c) 2011-2013 MaxLinear, Inc. All rights reserved 11 * which was released under GPL V2 12 */ 13 14 #ifndef _MXL5XX_H_ 15 #define _MXL5XX_H_ 16 17 #include <linux/types.h> 18 #include <linux/i2c.h> 19 20 #include <media/dvb_frontend.h> 21 22 struct mxl5xx_cfg { 23 u8 adr; 24 u8 type; 25 u32 cap; 26 u32 clk; 27 u32 ts_clk; 28 29 u8 *fw; 30 u32 fw_len; 31 32 int (*fw_read)(void *priv, u8 *buf, u32 len); 33 void *fw_priv; 34 }; 35 36 #if IS_REACHABLE(CONFIG_DVB_MXL5XX) 37 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)); 41 42 #else 43 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)) 47 { 48 pr_warn("%s: driver disabled by Kconfig\n", __func__); 49 return NULL; 50 } 51 52 #endif /* CONFIG_DVB_MXL5XX */ 53 54 #endif /* _MXL5XX_H_ */ 55