brintos

brintos / linux-shallow public Read only

0
0
Text · 2.2 KiB · 1c8438f Raw
68 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/* Common header-file of the Linux driver for the TwinhanDTV Alpha/MagicBoxII3 * USB2.0 DVB-T receiver.4 *5 * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de)6 *7 * Thanks to Twinhan who kindly provided hardware and information.8 *9 * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information10 */11#ifndef _DVB_USB_VP7045_H_12#define _DVB_USB_VP7045_H_13 14#define DVB_USB_LOG_PREFIX "vp7045"15#include "dvb-usb.h"16 17/* vp7045 commands */18 19/* Twinhan Vendor requests */20#define TH_COMMAND_IN                     0xC021#define TH_COMMAND_OUT                    0xC122 23/* command bytes */24#define TUNER_REG_READ                    0x0325#define TUNER_REG_WRITE                   0x0426 27#define RC_VAL_READ                       0x0528 #define RC_NO_KEY                        0x4429 30#define SET_TUNER_POWER                   0x0631#define CHECK_TUNER_POWER                 0x1232 #define Tuner_Power_ON                   133 #define Tuner_Power_OFF                  034 35#define GET_USB_SPEED                     0x0736 37#define LOCK_TUNER_COMMAND                0x0938 39#define TUNER_SIGNAL_READ                 0x0A40 41/* FX2 eeprom */42#define SET_EE_VALUE                      0x1043#define GET_EE_VALUE                      0x1144 #define FX2_ID_ADDR                      0x0045 #define VID_MSB_ADDR                     0x0246 #define VID_LSB_ADDR                     0x0147 #define PID_MSB_ADDR                     0x0448 #define PID_LSB_ADDR                     0x0349 #define MAC_0_ADDR                       0x0750 #define MAC_1_ADDR                       0x0851 #define MAC_2_ADDR                       0x0952 #define MAC_3_ADDR                       0x0a53 #define MAC_4_ADDR                       0x0b54 #define MAC_5_ADDR                       0x0c55 56#define RESET_FX2                         0x1357 58#define FW_VERSION_READ                   0x0B59#define VENDOR_STRING_READ                0x0C60#define PRODUCT_STRING_READ               0x0D61#define FW_BCD_VERSION_READ               0x1462 63extern struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d);64extern int vp7045_usb_op(struct dvb_usb_device *d, u8 cmd, u8 *out, int outlen, u8 *in, int inlen,int msec);65extern u8 vp7045_read_reg(struct dvb_usb_device *d, u8 reg);66 67#endif68