#define DVB_USB_LOG_PREFIX …
#include "dvb-usb.h"
#include "stv6110x.h"
#include "stv090x.h"
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
static int disable_led_control;
module_param(disable_led_control, int, 0444);
MODULE_PARM_DESC(…) …;
struct technisat_usb2_state { … };
#define deb_info(args...) …
#define deb_eeprom(args...) …
#define deb_i2c(args...) …
#define deb_rc(args...) …
#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 …
#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
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)
{ … }
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)
{ … }
static int technisat_usb2_power_ctrl(struct dvb_usb_device *d, int level)
{ … }
#if 0
static void technisat_usb2_eeprom_dump(struct dvb_usb_device *d)
{
u8 reg;
u8 b[16];
int i, j;
for (j = 0; j < 256 * 4; j += 16) {
reg = j;
if (technisat_usb2_i2c_access(d->udev, 0x50 + j / 256, ®, 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;
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)
{ … }
#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)
{ … }
enum { … };
static struct usb_device_id technisat_usb2_id_table[] = …;
MODULE_DEVICE_TABLE(usb, technisat_usb2_id_table);
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(…) …;