Full support for Ginger Console
[linux-ginger.git] / drivers / media / dvb / dvb-usb / vp7045.h
blob969688f8526750c8c9b8ea74d535ef1371885a49
1 /* Common header-file of the Linux driver for the TwinhanDTV Alpha/MagicBoxII
2 * USB2.0 DVB-T receiver.
4 * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@desy.de)
6 * Thanks to Twinhan who kindly provided hardware and information.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free
10 * Software Foundation, version 2.
12 * see Documentation/dvb/README.dvb-usb for more information
14 #ifndef _DVB_USB_VP7045_H_
15 #define _DVB_USB_VP7045_H_
17 #define DVB_USB_LOG_PREFIX "vp7045"
18 #include "dvb-usb.h"
20 /* vp7045 commands */
22 /* Twinhan Vendor requests */
23 #define TH_COMMAND_IN 0xC0
24 #define TH_COMMAND_OUT 0xC1
26 /* command bytes */
27 #define TUNER_REG_READ 0x03
28 #define TUNER_REG_WRITE 0x04
30 #define RC_VAL_READ 0x05
31 #define RC_NO_KEY 0x44
33 #define SET_TUNER_POWER 0x06
34 #define CHECK_TUNER_POWER 0x12
35 #define Tuner_Power_ON 1
36 #define Tuner_Power_OFF 0
38 #define GET_USB_SPEED 0x07
39 #define USB_SPEED_LOW 0
40 #define USB_SPEED_FULL 1
41 #define USB_SPEED_HIGH 2
43 #define LOCK_TUNER_COMMAND 0x09
45 #define TUNER_SIGNAL_READ 0x0A
47 /* FX2 eeprom */
48 #define SET_EE_VALUE 0x10
49 #define GET_EE_VALUE 0x11
50 #define FX2_ID_ADDR 0x00
51 #define VID_MSB_ADDR 0x02
52 #define VID_LSB_ADDR 0x01
53 #define PID_MSB_ADDR 0x04
54 #define PID_LSB_ADDR 0x03
55 #define MAC_0_ADDR 0x07
56 #define MAC_1_ADDR 0x08
57 #define MAC_2_ADDR 0x09
58 #define MAC_3_ADDR 0x0a
59 #define MAC_4_ADDR 0x0b
60 #define MAC_5_ADDR 0x0c
62 #define RESET_FX2 0x13
64 #define FW_VERSION_READ 0x0B
65 #define VENDOR_STRING_READ 0x0C
66 #define PRODUCT_STRING_READ 0x0D
67 #define FW_BCD_VERSION_READ 0x14
69 extern struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d);
70 extern int vp7045_usb_op(struct dvb_usb_device *d, u8 cmd, u8 *out, int outlen, u8 *in, int inlen,int msec);
71 extern u8 vp7045_read_reg(struct dvb_usb_device *d, u8 reg);
73 #endif