xref: /OK3568_Linux_fs/kernel/drivers/media/dvb-frontends/drx39xyj/drx39xxj.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  *  Driver for Micronas DRX39xx family (drx3933j)
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  *  Written by Devin Heitmueller <devin.heitmueller@kernellabs.com>
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #ifndef DRX39XXJ_H
9*4882a593Smuzhiyun #define DRX39XXJ_H
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #include <linux/dvb/frontend.h>
12*4882a593Smuzhiyun #include <media/dvb_frontend.h>
13*4882a593Smuzhiyun #include "drx_driver.h"
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun struct drx39xxj_state {
16*4882a593Smuzhiyun 	struct i2c_adapter *i2c;
17*4882a593Smuzhiyun 	struct drx_demod_instance *demod;
18*4882a593Smuzhiyun 	struct dvb_frontend frontend;
19*4882a593Smuzhiyun 	unsigned int i2c_gate_open:1;
20*4882a593Smuzhiyun 	const struct firmware *fw;
21*4882a593Smuzhiyun };
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_DVB_DRX39XYJ)
24*4882a593Smuzhiyun struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c);
25*4882a593Smuzhiyun #else
drx39xxj_attach(struct i2c_adapter * i2c)26*4882a593Smuzhiyun static inline struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c) {
27*4882a593Smuzhiyun 	return NULL;
28*4882a593Smuzhiyun };
29*4882a593Smuzhiyun #endif
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun #endif /* DVB_DUMMY_FE_H */
32