blob: 8c51ac4493dde1fab53377a45975361c527f76dd [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Johannes Stezenbach776338e2005-06-23 22:02:35 -07002/* dvb-usb-common.h is part of the DVB USB library.
3 *
Patrick Boettcher99e44da2016-01-24 12:56:58 -02004 * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de)
Johannes Stezenbach776338e2005-06-23 22:02:35 -07005 * see dvb-usb-init.c for copyright information.
6 *
7 * a header file containing prototypes and types for internal use of the dvb-usb-lib
8 */
9#ifndef _DVB_USB_COMMON_H_
10#define _DVB_USB_COMMON_H_
11
12#define DVB_USB_LOG_PREFIX "dvb-usb"
13#include "dvb-usb.h"
14
15extern int dvb_usb_debug;
Patrick Boettcherc9b06fa2005-07-07 17:58:11 -070016extern int dvb_usb_disable_rc_polling;
Johannes Stezenbach776338e2005-06-23 22:02:35 -070017
Patrick Boettcher4d43e132006-09-30 06:53:48 -030018#define deb_info(args...) dprintk(dvb_usb_debug,0x001,args)
19#define deb_xfer(args...) dprintk(dvb_usb_debug,0x002,args)
20#define deb_pll(args...) dprintk(dvb_usb_debug,0x004,args)
21#define deb_ts(args...) dprintk(dvb_usb_debug,0x008,args)
22#define deb_err(args...) dprintk(dvb_usb_debug,0x010,args)
23#define deb_rc(args...) dprintk(dvb_usb_debug,0x020,args)
24#define deb_fw(args...) dprintk(dvb_usb_debug,0x040,args)
25#define deb_mem(args...) dprintk(dvb_usb_debug,0x080,args)
26#define deb_uxfer(args...) dprintk(dvb_usb_debug,0x100,args)
Johannes Stezenbach776338e2005-06-23 22:02:35 -070027
28/* commonly used methods */
Patrick Boettcher4d43e132006-09-30 06:53:48 -030029extern int dvb_usb_download_firmware(struct usb_device *, struct dvb_usb_device_properties *);
Johannes Stezenbach776338e2005-06-23 22:02:35 -070030
Patrick Boettcher4d43e132006-09-30 06:53:48 -030031extern int dvb_usb_device_power_ctrl(struct dvb_usb_device *d, int onoff);
32
33extern int usb_urb_init(struct usb_data_stream *stream, struct usb_data_stream_properties *props);
34extern int usb_urb_exit(struct usb_data_stream *stream);
35extern int usb_urb_submit(struct usb_data_stream *stream);
36extern int usb_urb_kill(struct usb_data_stream *stream);
37
38extern int dvb_usb_adapter_stream_init(struct dvb_usb_adapter *adap);
39extern int dvb_usb_adapter_stream_exit(struct dvb_usb_adapter *adap);
Johannes Stezenbach776338e2005-06-23 22:02:35 -070040
41extern int dvb_usb_i2c_init(struct dvb_usb_device *);
42extern int dvb_usb_i2c_exit(struct dvb_usb_device *);
43
Janne Grunau78e92002008-04-09 19:13:13 -030044extern int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap,
45 short *adapter_nums);
Patrick Boettcher4d43e132006-09-30 06:53:48 -030046extern int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap);
47extern int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap);
48extern int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap);
Johannes Stezenbach776338e2005-06-23 22:02:35 -070049
50extern int dvb_usb_remote_init(struct dvb_usb_device *);
51extern int dvb_usb_remote_exit(struct dvb_usb_device *);
52
53#endif