linux/drivers/media/usb/dvb-usb/technisat-usb2.c

/*
 * Linux driver for Technisat DVB-S/S2 USB 2.0 device
 *
 * Copyright (C) 2010 Patrick Boettcher,
 *                    Kernel Labs Inc. PO Box 745, St James, NY 11780
 *
 * Development was sponsored by Technisat Digital UK Limited, whose
 * registered office is Witan Gate House 500 - 600 Witan Gate West,
 * Milton Keynes, MK9 1SH
 *
 * 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 PROVIDED "AS IS" AND BOTH THE COPYRIGHT HOLDER AND
 * TECHNISAT DIGITAL UK LTD DISCLAIM ALL WARRANTIES WITH REGARD TO
 * THIS PROGRAM INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY OR
 * FITNESS FOR A PARTICULAR PURPOSE.  NEITHER THE COPYRIGHT HOLDER
 * NOR TECHNISAT DIGITAL UK LIMITED SHALL BE LIABLE FOR ANY SPECIAL,
 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS PROGRAM. See the
 * GNU General Public License for more details.
 */

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

#include "stv6110x.h"
#include "stv090x.h"

/* module parameters */
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);

static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC();

/* disables all LED control command and
 * also does not start the signal polling thread */
static int disable_led_control;
module_param(disable_led_control, int, 0444);
MODULE_PARM_DESC();

/* device private data */
struct technisat_usb2_state {};

/* debug print helpers */
#define deb_info(args...)
#define deb_eeprom(args...)
#define deb_i2c(args...)
#define deb_rc(args...)

/* vendor requests */
#define SET_IFCLK_TO_EXTERNAL_TSCLK_VENDOR_REQUEST
#define SET_FRONT_END_RESET_VENDOR_REQUEST
#define GET_VERSION_INFO_VENDOR_REQUEST
#define SET_GREEN_LED_VENDOR_REQUEST
#define SET_RED_LED_VENDOR_REQUEST
#define GET_IR_DATA_VENDOR_REQUEST
#define SET_LED_TIMER_DIVIDER_VENDOR_REQUEST
#define SET_USB_REENUMERATION

/* i2c-access methods */
#define I2C_SPEED_100KHZ_BIT

#define I2C_STATUS_NAK
#define I2C_STATUS_OK

static int technisat_usb2_i2c_access(struct usb_device *udev,
		u8 device_addr, u8 *tx, u8 txlen, u8 *rx, u8 rxlen)
{}

static int technisat_usb2_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
				int num)
{}

static u32 technisat_usb2_i2c_func(struct i2c_adapter *adapter)
{}

static struct i2c_algorithm technisat_usb2_i2c_algo =;

#if 0
static void technisat_usb2_frontend_reset(struct usb_device *udev)
{
	usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
			SET_FRONT_END_RESET_VENDOR_REQUEST,
			USB_TYPE_VENDOR | USB_DIR_OUT,
			10, 0,
			NULL, 0, 500);
}
#endif

/* LED control */
enum technisat_usb2_led_state {};

static int technisat_usb2_set_led(struct dvb_usb_device *d, int red,
				  enum technisat_usb2_led_state st)
{}

static int technisat_usb2_set_led_timer(struct dvb_usb_device *d, u8 red, u8 green)
{}

static void technisat_usb2_green_led_control(struct work_struct *work)
{}

/* method to find out whether the firmware has to be downloaded or not */
static int technisat_usb2_identify_state(struct usb_device *udev,
		const struct dvb_usb_device_properties *props,
		const struct dvb_usb_device_description **desc, int *cold)
{}

/* power control */
static int technisat_usb2_power_ctrl(struct dvb_usb_device *d, int level)
{}

/* mac address reading - from the eeprom */
#if 0
static void technisat_usb2_eeprom_dump(struct dvb_usb_device *d)
{
	u8 reg;
	u8 b[16];
	int i, j;

	/* full EEPROM dump */
	for (j = 0; j < 256 * 4; j += 16) {
		reg = j;
		if (technisat_usb2_i2c_access(d->udev, 0x50 + j / 256, &reg, 1, b, 16) != 0)
			break;

		deb_eeprom("EEPROM: %01x%02x: ", j / 256, reg);
		for (i = 0; i < 16; i++)
			deb_eeprom("%02x ", b[i]);
		deb_eeprom("\n");
	}
}
#endif

static u8 technisat_usb2_calc_lrc(const u8 *b, u16 length)
{}

static int technisat_usb2_eeprom_lrc_read(struct dvb_usb_device *d,
	u16 offset, u8 *b, u16 length, u8 tries)
{}

#define EEPROM_MAC_START
#define EEPROM_MAC_TOTAL
static int technisat_usb2_read_mac_address(struct dvb_usb_device *d,
		u8 mac[])
{}

static struct stv090x_config technisat_usb2_stv090x_config;

/* frontend attach */
static int technisat_usb2_set_voltage(struct dvb_frontend *fe,
				      enum fe_sec_voltage voltage)
{}

static struct stv090x_config technisat_usb2_stv090x_config =;

static struct stv6110x_config technisat_usb2_stv6110x_config =;

static int technisat_usb2_frontend_attach(struct dvb_usb_adapter *a)
{}

/* Remote control */

/* the device is giving providing raw IR-signals to the host mapping
 * it only to one remote control is just the default implementation
 */
#define NOMINAL_IR_BIT_TRANSITION_TIME_US
#define NOMINAL_IR_BIT_TIME_US

#define FIRMWARE_CLOCK_TICK
#define FIRMWARE_CLOCK_DIVISOR

#define IR_PERCENT_TOLERANCE

#define NOMINAL_IR_BIT_TRANSITION_TICKS
#define NOMINAL_IR_BIT_TRANSITION_TICK_COUNT

#define NOMINAL_IR_BIT_TIME_TICKS
#define NOMINAL_IR_BIT_TIME_TICK_COUNT

#define MINIMUM_IR_BIT_TRANSITION_TICK_COUNT
#define MAXIMUM_IR_BIT_TRANSITION_TICK_COUNT

#define MINIMUM_IR_BIT_TIME_TICK_COUNT
#define MAXIMUM_IR_BIT_TIME_TICK_COUNT

static int technisat_usb2_get_ir(struct dvb_usb_device *d)
{}

static int technisat_usb2_rc_query(struct dvb_usb_device *d)
{}

/* DVB-USB and USB stuff follows */
enum {};

static struct usb_device_id technisat_usb2_id_table[] =;

MODULE_DEVICE_TABLE(usb, technisat_usb2_id_table);

/* device description */
static struct dvb_usb_device_properties technisat_usb2_devices =;

static int technisat_usb2_probe(struct usb_interface *intf,
		const struct usb_device_id *id)
{}

static void technisat_usb2_disconnect(struct usb_interface *intf)
{}

static struct usb_driver technisat_usb2_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_VERSION();
MODULE_LICENSE();