1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3     Conexant cx24116/cx24118 - DVBS/S2 Satellite demod/tuner driver
4 
5     Copyright (C) 2006 Steven Toth <stoth@linuxtv.com>
6 
7 */
8 
9 #ifndef CX24116_H
10 #define CX24116_H
11 
12 #include <linux/dvb/frontend.h>
13 
14 struct cx24116_config {
15 	/* the demodulator's i2c address */
16 	u8 demod_address;
17 
18 	/* Need to set device param for start_dma */
19 	int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
20 
21 	/* Need to reset device during firmware loading */
22 	int (*reset_device)(struct dvb_frontend *fe);
23 
24 	/* Need to set MPEG parameters */
25 	u8 mpg_clk_pos_pol:0x02;
26 
27 	/* max bytes I2C provider can write at once */
28 	u16 i2c_wr_max;
29 };
30 
31 #if IS_REACHABLE(CONFIG_DVB_CX24116)
32 extern struct dvb_frontend *cx24116_attach(
33 	const struct cx24116_config *config,
34 	struct i2c_adapter *i2c);
35 #else
cx24116_attach(const struct cx24116_config * config,struct i2c_adapter * i2c)36 static inline struct dvb_frontend *cx24116_attach(
37 	const struct cx24116_config *config,
38 	struct i2c_adapter *i2c)
39 {
40 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
41 	return NULL;
42 }
43 #endif
44 
45 #endif /* CX24116_H */
46