xref: /OK3568_Linux_fs/kernel/drivers/media/dvb-frontends/bcm3510.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Support for the Broadcom BCM3510 ATSC demodulator (1st generation Air2PC)
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  *  Copyright (C) 2001-5, B2C2 inc.
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  *  GPL/Linux driver written by Patrick Boettcher <patrick.boettcher@posteo.de>
8*4882a593Smuzhiyun  */
9*4882a593Smuzhiyun #ifndef BCM3510_H
10*4882a593Smuzhiyun #define BCM3510_H
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include <linux/dvb/frontend.h>
13*4882a593Smuzhiyun #include <linux/firmware.h>
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun struct bcm3510_config
16*4882a593Smuzhiyun {
17*4882a593Smuzhiyun 	/* the demodulator's i2c address */
18*4882a593Smuzhiyun 	u8 demod_address;
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun 	/* request firmware for device */
21*4882a593Smuzhiyun 	int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name);
22*4882a593Smuzhiyun };
23*4882a593Smuzhiyun 
24*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_DVB_BCM3510)
25*4882a593Smuzhiyun extern struct dvb_frontend* bcm3510_attach(const struct bcm3510_config* config,
26*4882a593Smuzhiyun 					   struct i2c_adapter* i2c);
27*4882a593Smuzhiyun #else
bcm3510_attach(const struct bcm3510_config * config,struct i2c_adapter * i2c)28*4882a593Smuzhiyun static inline struct dvb_frontend* bcm3510_attach(const struct bcm3510_config* config,
29*4882a593Smuzhiyun 						  struct i2c_adapter* i2c)
30*4882a593Smuzhiyun {
31*4882a593Smuzhiyun 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
32*4882a593Smuzhiyun 	return NULL;
33*4882a593Smuzhiyun }
34*4882a593Smuzhiyun #endif // CONFIG_DVB_BCM3510
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun #endif
37