linux/drivers/media/usb/dvb-usb/vp7045.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* Common header-file of the Linux driver for the TwinhanDTV Alpha/MagicBoxII
 * USB2.0 DVB-T receiver.
 *
 * Copyright (C) 2004-5 Patrick Boettcher ([email protected])
 *
 * Thanks to Twinhan who kindly provided hardware and information.
 *
 * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information
 */
#ifndef _DVB_USB_VP7045_H_
#define _DVB_USB_VP7045_H_

#define DVB_USB_LOG_PREFIX
#include "dvb-usb.h"

/* vp7045 commands */

/* Twinhan Vendor requests */
#define TH_COMMAND_IN
#define TH_COMMAND_OUT

/* command bytes */
#define TUNER_REG_READ
#define TUNER_REG_WRITE

#define RC_VAL_READ
 #define RC_NO_KEY

#define SET_TUNER_POWER
#define CHECK_TUNER_POWER
 #define Tuner_Power_ON
 #define Tuner_Power_OFF

#define GET_USB_SPEED

#define LOCK_TUNER_COMMAND

#define TUNER_SIGNAL_READ

/* FX2 eeprom */
#define SET_EE_VALUE
#define GET_EE_VALUE
 #define FX2_ID_ADDR
 #define VID_MSB_ADDR
 #define VID_LSB_ADDR
 #define PID_MSB_ADDR
 #define PID_LSB_ADDR
 #define MAC_0_ADDR
 #define MAC_1_ADDR
 #define MAC_2_ADDR
 #define MAC_3_ADDR
 #define MAC_4_ADDR
 #define MAC_5_ADDR

#define RESET_FX2

#define FW_VERSION_READ
#define VENDOR_STRING_READ
#define PRODUCT_STRING_READ
#define FW_BCD_VERSION_READ

extern struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d);
extern int vp7045_usb_op(struct dvb_usb_device *d, u8 cmd, u8 *out, int outlen, u8 *in, int inlen,int msec);
extern u8 vp7045_read_reg(struct dvb_usb_device *d, u8 reg);

#endif