Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 2 | /* dvb-usb-common.h is part of the DVB USB library. |
| 3 | * |
Patrick Boettcher | 99e44da | 2016-01-24 12:56:58 -0200 | [diff] [blame] | 4 | * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 5 | * 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 | |
| 15 | extern int dvb_usb_debug; |
Patrick Boettcher | c9b06fa | 2005-07-07 17:58:11 -0700 | [diff] [blame] | 16 | extern int dvb_usb_disable_rc_polling; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 17 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 18 | #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 Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 27 | |
| 28 | /* commonly used methods */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 29 | extern int dvb_usb_download_firmware(struct usb_device *, struct dvb_usb_device_properties *); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 30 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 31 | extern int dvb_usb_device_power_ctrl(struct dvb_usb_device *d, int onoff); |
| 32 | |
| 33 | extern int usb_urb_init(struct usb_data_stream *stream, struct usb_data_stream_properties *props); |
| 34 | extern int usb_urb_exit(struct usb_data_stream *stream); |
| 35 | extern int usb_urb_submit(struct usb_data_stream *stream); |
| 36 | extern int usb_urb_kill(struct usb_data_stream *stream); |
| 37 | |
| 38 | extern int dvb_usb_adapter_stream_init(struct dvb_usb_adapter *adap); |
| 39 | extern int dvb_usb_adapter_stream_exit(struct dvb_usb_adapter *adap); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 40 | |
| 41 | extern int dvb_usb_i2c_init(struct dvb_usb_device *); |
| 42 | extern int dvb_usb_i2c_exit(struct dvb_usb_device *); |
| 43 | |
Janne Grunau | 78e9200 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 44 | extern int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, |
| 45 | short *adapter_nums); |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 46 | extern int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap); |
| 47 | extern int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap); |
| 48 | extern int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 49 | |
| 50 | extern int dvb_usb_remote_init(struct dvb_usb_device *); |
| 51 | extern int dvb_usb_remote_exit(struct dvb_usb_device *); |
| 52 | |
| 53 | #endif |