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