1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun * public header file of the frontend drivers for mobile DVB-T demodulators
4*4882a593Smuzhiyun * DiBcom 3000M-B and DiBcom 3000P/M-C (http://www.dibcom.fr/)
5*4882a593Smuzhiyun *
6*4882a593Smuzhiyun * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de)
7*4882a593Smuzhiyun *
8*4882a593Smuzhiyun * based on GPL code from DibCom, which has
9*4882a593Smuzhiyun *
10*4882a593Smuzhiyun * Copyright (C) 2004 Amaury Demol for DiBcom
11*4882a593Smuzhiyun *
12*4882a593Smuzhiyun * Acknowledgements
13*4882a593Smuzhiyun *
14*4882a593Smuzhiyun * Amaury Demol from DiBcom for providing specs and driver
15*4882a593Smuzhiyun * sources, on which this driver (and the dvb-dibusb) are based.
16*4882a593Smuzhiyun *
17*4882a593Smuzhiyun * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information
18*4882a593Smuzhiyun */
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun #ifndef DIB3000_H
21*4882a593Smuzhiyun #define DIB3000_H
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun #include <linux/dvb/frontend.h>
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun struct dib3000_config
26*4882a593Smuzhiyun {
27*4882a593Smuzhiyun /* the demodulator's i2c address */
28*4882a593Smuzhiyun u8 demod_address;
29*4882a593Smuzhiyun };
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun struct dib_fe_xfer_ops
32*4882a593Smuzhiyun {
33*4882a593Smuzhiyun /* pid and transfer handling is done in the demodulator */
34*4882a593Smuzhiyun int (*pid_parse)(struct dvb_frontend *fe, int onoff);
35*4882a593Smuzhiyun int (*fifo_ctrl)(struct dvb_frontend *fe, int onoff);
36*4882a593Smuzhiyun int (*pid_ctrl)(struct dvb_frontend *fe, int index, int pid, int onoff);
37*4882a593Smuzhiyun int (*tuner_pass_ctrl)(struct dvb_frontend *fe, int onoff, u8 pll_ctrl);
38*4882a593Smuzhiyun };
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun #if IS_REACHABLE(CONFIG_DVB_DIB3000MB)
41*4882a593Smuzhiyun extern struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
42*4882a593Smuzhiyun struct i2c_adapter* i2c, struct dib_fe_xfer_ops *xfer_ops);
43*4882a593Smuzhiyun #else
dib3000mb_attach(const struct dib3000_config * config,struct i2c_adapter * i2c,struct dib_fe_xfer_ops * xfer_ops)44*4882a593Smuzhiyun static inline struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
45*4882a593Smuzhiyun struct i2c_adapter* i2c, struct dib_fe_xfer_ops *xfer_ops)
46*4882a593Smuzhiyun {
47*4882a593Smuzhiyun printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
48*4882a593Smuzhiyun return NULL;
49*4882a593Smuzhiyun }
50*4882a593Smuzhiyun #endif // CONFIG_DVB_DIB3000MB
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun #endif // DIB3000_H
53