Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * public header file of the frontend drivers for mobile DVB-T demodulators
0004  * DiBcom 3000M-B and DiBcom 3000P/M-C (http://www.dibcom.fr/)
0005  *
0006  * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de)
0007  *
0008  * based on GPL code from DibCom, which has
0009  *
0010  * Copyright (C) 2004 Amaury Demol for DiBcom
0011  *
0012  * Acknowledgements
0013  *
0014  *  Amaury Demol from DiBcom for providing specs and driver
0015  *  sources, on which this driver (and the dvb-dibusb) are based.
0016  *
0017  * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information
0018  */
0019 
0020 #ifndef DIB3000_H
0021 #define DIB3000_H
0022 
0023 #include <linux/dvb/frontend.h>
0024 
0025 struct dib3000_config
0026 {
0027     /* the demodulator's i2c address */
0028     u8 demod_address;
0029 };
0030 
0031 struct dib_fe_xfer_ops
0032 {
0033     /* pid and transfer handling is done in the demodulator */
0034     int (*pid_parse)(struct dvb_frontend *fe, int onoff);
0035     int (*fifo_ctrl)(struct dvb_frontend *fe, int onoff);
0036     int (*pid_ctrl)(struct dvb_frontend *fe, int index, int pid, int onoff);
0037     int (*tuner_pass_ctrl)(struct dvb_frontend *fe, int onoff, u8 pll_ctrl);
0038 };
0039 
0040 #if IS_REACHABLE(CONFIG_DVB_DIB3000MB)
0041 extern struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
0042                          struct i2c_adapter* i2c, struct dib_fe_xfer_ops *xfer_ops);
0043 #else
0044 static inline struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
0045                          struct i2c_adapter* i2c, struct dib_fe_xfer_ops *xfer_ops)
0046 {
0047     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0048     return NULL;
0049 }
0050 #endif // CONFIG_DVB_DIB3000MB
0051 
0052 #endif // DIB3000_H