mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
c942fddf87
Based on 3 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
82 lines
2.3 KiB
C
82 lines
2.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* TerraTec Cinergy T2/qanu USB2 DVB-T adapter.
|
|
*
|
|
* Copyright (C) 2007 Tomi Orava (tomimo@ncircle.nullnet.fi)
|
|
*
|
|
* Based on the dvb-usb-framework code and the
|
|
* original Terratec Cinergy T2 driver by:
|
|
*
|
|
* Copyright (C) 2004 Daniel Mack <daniel@qanu.de> and
|
|
* Holger Waechtler <holger@qanu.de>
|
|
*
|
|
* Protocol Spec published on http://qanu.de/specs/terratec_cinergyT2.pdf
|
|
*/
|
|
|
|
#ifndef _DVB_USB_CINERGYT2_H_
|
|
#define _DVB_USB_CINERGYT2_H_
|
|
|
|
#include <linux/usb/input.h>
|
|
|
|
#define DVB_USB_LOG_PREFIX "cinergyT2"
|
|
#include "dvb-usb.h"
|
|
|
|
#define DRIVER_NAME "TerraTec/qanu USB2.0 Highspeed DVB-T Receiver"
|
|
|
|
extern int dvb_usb_cinergyt2_debug;
|
|
|
|
#define deb_info(args...) dprintk(dvb_usb_cinergyt2_debug, 0x001, args)
|
|
#define deb_xfer(args...) dprintk(dvb_usb_cinergyt2_debug, 0x002, args)
|
|
#define deb_pll(args...) dprintk(dvb_usb_cinergyt2_debug, 0x004, args)
|
|
#define deb_ts(args...) dprintk(dvb_usb_cinergyt2_debug, 0x008, args)
|
|
#define deb_err(args...) dprintk(dvb_usb_cinergyt2_debug, 0x010, args)
|
|
#define deb_rc(args...) dprintk(dvb_usb_cinergyt2_debug, 0x020, args)
|
|
#define deb_fw(args...) dprintk(dvb_usb_cinergyt2_debug, 0x040, args)
|
|
#define deb_mem(args...) dprintk(dvb_usb_cinergyt2_debug, 0x080, args)
|
|
#define deb_uxfer(args...) dprintk(dvb_usb_cinergyt2_debug, 0x100, args)
|
|
|
|
|
|
|
|
enum cinergyt2_ep1_cmd {
|
|
CINERGYT2_EP1_PID_TABLE_RESET = 0x01,
|
|
CINERGYT2_EP1_PID_SETUP = 0x02,
|
|
CINERGYT2_EP1_CONTROL_STREAM_TRANSFER = 0x03,
|
|
CINERGYT2_EP1_SET_TUNER_PARAMETERS = 0x04,
|
|
CINERGYT2_EP1_GET_TUNER_STATUS = 0x05,
|
|
CINERGYT2_EP1_START_SCAN = 0x06,
|
|
CINERGYT2_EP1_CONTINUE_SCAN = 0x07,
|
|
CINERGYT2_EP1_GET_RC_EVENTS = 0x08,
|
|
CINERGYT2_EP1_SLEEP_MODE = 0x09,
|
|
CINERGYT2_EP1_GET_FIRMWARE_VERSION = 0x0A
|
|
};
|
|
|
|
|
|
struct dvbt_get_status_msg {
|
|
uint32_t freq;
|
|
uint8_t bandwidth;
|
|
uint16_t tps;
|
|
uint8_t flags;
|
|
__le16 gain;
|
|
uint8_t snr;
|
|
__le32 viterbi_error_rate;
|
|
uint32_t rs_error_rate;
|
|
__le32 uncorrected_block_count;
|
|
uint8_t lock_bits;
|
|
uint8_t prev_lock_bits;
|
|
} __attribute__((packed));
|
|
|
|
|
|
struct dvbt_set_parameters_msg {
|
|
uint8_t cmd;
|
|
__le32 freq;
|
|
uint8_t bandwidth;
|
|
__le16 tps;
|
|
uint8_t flags;
|
|
} __attribute__((packed));
|
|
|
|
|
|
extern struct dvb_frontend *cinergyt2_fe_attach(struct dvb_usb_device *d);
|
|
|
|
#endif /* _DVB_USB_CINERGYT2_H_ */
|
|
|