Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
technisat-usb2.c File Reference
#include "dvb-usb.h"
#include "stv6110x.h"
#include "stv090x.h"

Go to the source code of this file.

Data Structures

struct  technisat_usb2_state
 

Macros

#define DVB_USB_LOG_PREFIX   "technisat-usb2"
 
#define deb_info(args...)   dprintk(debug, 0x01, args)
 
#define deb_eeprom(args...)   dprintk(debug, 0x02, args)
 
#define deb_i2c(args...)   dprintk(debug, 0x04, args)
 
#define deb_rc(args...)   dprintk(debug, 0x08, args)
 
#define SET_IFCLK_TO_EXTERNAL_TSCLK_VENDOR_REQUEST   0xB3
 
#define SET_FRONT_END_RESET_VENDOR_REQUEST   0xB4
 
#define GET_VERSION_INFO_VENDOR_REQUEST   0xB5
 
#define SET_GREEN_LED_VENDOR_REQUEST   0xB6
 
#define SET_RED_LED_VENDOR_REQUEST   0xB7
 
#define GET_IR_DATA_VENDOR_REQUEST   0xB8
 
#define SET_LED_TIMER_DIVIDER_VENDOR_REQUEST   0xB9
 
#define SET_USB_REENUMERATION   0xBA
 
#define I2C_SPEED_100KHZ_BIT   0x40
 
#define I2C_STATUS_NAK   7
 
#define I2C_STATUS_OK   8
 
#define EEPROM_MAC_START   0x3f8
 
#define EEPROM_MAC_TOTAL   8
 
#define NOMINAL_IR_BIT_TRANSITION_TIME_US   889
 
#define NOMINAL_IR_BIT_TIME_US   (2 * NOMINAL_IR_BIT_TRANSITION_TIME_US)
 
#define FIRMWARE_CLOCK_TICK   83333
 
#define FIRMWARE_CLOCK_DIVISOR   256
 
#define IR_PERCENT_TOLERANCE   15
 
#define NOMINAL_IR_BIT_TRANSITION_TICKS   ((NOMINAL_IR_BIT_TRANSITION_TIME_US * 1000 * 1000) / FIRMWARE_CLOCK_TICK)
 
#define NOMINAL_IR_BIT_TRANSITION_TICK_COUNT   (NOMINAL_IR_BIT_TRANSITION_TICKS / FIRMWARE_CLOCK_DIVISOR)
 
#define NOMINAL_IR_BIT_TIME_TICKS   ((NOMINAL_IR_BIT_TIME_US * 1000 * 1000) / FIRMWARE_CLOCK_TICK)
 
#define NOMINAL_IR_BIT_TIME_TICK_COUNT   (NOMINAL_IR_BIT_TIME_TICKS / FIRMWARE_CLOCK_DIVISOR)
 
#define MINIMUM_IR_BIT_TRANSITION_TICK_COUNT   (NOMINAL_IR_BIT_TRANSITION_TICK_COUNT - ((NOMINAL_IR_BIT_TRANSITION_TICK_COUNT * IR_PERCENT_TOLERANCE) / 100))
 
#define MAXIMUM_IR_BIT_TRANSITION_TICK_COUNT   (NOMINAL_IR_BIT_TRANSITION_TICK_COUNT + ((NOMINAL_IR_BIT_TRANSITION_TICK_COUNT * IR_PERCENT_TOLERANCE) / 100))
 
#define MINIMUM_IR_BIT_TIME_TICK_COUNT   (NOMINAL_IR_BIT_TIME_TICK_COUNT - ((NOMINAL_IR_BIT_TIME_TICK_COUNT * IR_PERCENT_TOLERANCE) / 100))
 
#define MAXIMUM_IR_BIT_TIME_TICK_COUNT   (NOMINAL_IR_BIT_TIME_TICK_COUNT + ((NOMINAL_IR_BIT_TIME_TICK_COUNT * IR_PERCENT_TOLERANCE) / 100))
 

Enumerations

enum  technisat_usb2_led_state { LED_OFF, LED_BLINK, LED_ON, LED_UNDEFINED }
 

Functions

 DVB_DEFINE_MOD_OPT_ADAPTER_NR (adapter_nr)
 
 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"set debugging level (bit-mask: 1=info,2=eeprom,4=i2c,8=rc)."DVB_USB_DEBUG_STATUS)
 
 module_param (disable_led_control, int, 0444)
 
 MODULE_PARM_DESC (disable_led_control,"disable LED control of the device ""(default: 0 - LED control is active).")
 
 MODULE_DEVICE_TABLE (usb, technisat_usb2_id_table)
 
 module_usb_driver (technisat_usb2_driver)
 
 MODULE_AUTHOR ("Patrick Boettcher <[email protected]>")
 
 MODULE_DESCRIPTION ("Driver for Technisat DVB-S/S2 USB 2.0 device")
 
 MODULE_VERSION ("1.0")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define deb_eeprom (   args...)    dprintk(debug, 0x02, args)

Definition at line 67 of file technisat-usb2.c.

#define deb_i2c (   args...)    dprintk(debug, 0x04, args)

Definition at line 68 of file technisat-usb2.c.

#define deb_info (   args...)    dprintk(debug, 0x01, args)

Definition at line 66 of file technisat-usb2.c.

#define deb_rc (   args...)    dprintk(debug, 0x08, args)

Definition at line 69 of file technisat-usb2.c.

#define DVB_USB_LOG_PREFIX   "technisat-usb2"

Definition at line 33 of file technisat-usb2.c.

#define EEPROM_MAC_START   0x3f8

Definition at line 437 of file technisat-usb2.c.

#define EEPROM_MAC_TOTAL   8

Definition at line 438 of file technisat-usb2.c.

#define FIRMWARE_CLOCK_DIVISOR   256

Definition at line 576 of file technisat-usb2.c.

#define FIRMWARE_CLOCK_TICK   83333

Definition at line 575 of file technisat-usb2.c.

#define GET_IR_DATA_VENDOR_REQUEST   0xB8

Definition at line 77 of file technisat-usb2.c.

#define GET_VERSION_INFO_VENDOR_REQUEST   0xB5

Definition at line 74 of file technisat-usb2.c.

#define I2C_SPEED_100KHZ_BIT   0x40

Definition at line 82 of file technisat-usb2.c.

#define I2C_STATUS_NAK   7

Definition at line 84 of file technisat-usb2.c.

#define I2C_STATUS_OK   8

Definition at line 85 of file technisat-usb2.c.

#define IR_PERCENT_TOLERANCE   15

Definition at line 578 of file technisat-usb2.c.

#define MAXIMUM_IR_BIT_TIME_TICK_COUNT   (NOMINAL_IR_BIT_TIME_TICK_COUNT + ((NOMINAL_IR_BIT_TIME_TICK_COUNT * IR_PERCENT_TOLERANCE) / 100))

Definition at line 590 of file technisat-usb2.c.

#define MAXIMUM_IR_BIT_TRANSITION_TICK_COUNT   (NOMINAL_IR_BIT_TRANSITION_TICK_COUNT + ((NOMINAL_IR_BIT_TRANSITION_TICK_COUNT * IR_PERCENT_TOLERANCE) / 100))

Definition at line 587 of file technisat-usb2.c.

#define MINIMUM_IR_BIT_TIME_TICK_COUNT   (NOMINAL_IR_BIT_TIME_TICK_COUNT - ((NOMINAL_IR_BIT_TIME_TICK_COUNT * IR_PERCENT_TOLERANCE) / 100))

Definition at line 589 of file technisat-usb2.c.

#define MINIMUM_IR_BIT_TRANSITION_TICK_COUNT   (NOMINAL_IR_BIT_TRANSITION_TICK_COUNT - ((NOMINAL_IR_BIT_TRANSITION_TICK_COUNT * IR_PERCENT_TOLERANCE) / 100))

Definition at line 586 of file technisat-usb2.c.

#define NOMINAL_IR_BIT_TIME_TICK_COUNT   (NOMINAL_IR_BIT_TIME_TICKS / FIRMWARE_CLOCK_DIVISOR)

Definition at line 584 of file technisat-usb2.c.

#define NOMINAL_IR_BIT_TIME_TICKS   ((NOMINAL_IR_BIT_TIME_US * 1000 * 1000) / FIRMWARE_CLOCK_TICK)

Definition at line 583 of file technisat-usb2.c.

#define NOMINAL_IR_BIT_TIME_US   (2 * NOMINAL_IR_BIT_TRANSITION_TIME_US)

Definition at line 573 of file technisat-usb2.c.

#define NOMINAL_IR_BIT_TRANSITION_TICK_COUNT   (NOMINAL_IR_BIT_TRANSITION_TICKS / FIRMWARE_CLOCK_DIVISOR)

Definition at line 581 of file technisat-usb2.c.

#define NOMINAL_IR_BIT_TRANSITION_TICKS   ((NOMINAL_IR_BIT_TRANSITION_TIME_US * 1000 * 1000) / FIRMWARE_CLOCK_TICK)

Definition at line 580 of file technisat-usb2.c.

#define NOMINAL_IR_BIT_TRANSITION_TIME_US   889

Definition at line 572 of file technisat-usb2.c.

#define SET_FRONT_END_RESET_VENDOR_REQUEST   0xB4

Definition at line 73 of file technisat-usb2.c.

#define SET_GREEN_LED_VENDOR_REQUEST   0xB6

Definition at line 75 of file technisat-usb2.c.

#define SET_IFCLK_TO_EXTERNAL_TSCLK_VENDOR_REQUEST   0xB3

Definition at line 72 of file technisat-usb2.c.

#define SET_LED_TIMER_DIVIDER_VENDOR_REQUEST   0xB9

Definition at line 78 of file technisat-usb2.c.

#define SET_RED_LED_VENDOR_REQUEST   0xB7

Definition at line 76 of file technisat-usb2.c.

#define SET_USB_REENUMERATION   0xBA

Definition at line 79 of file technisat-usb2.c.

Enumeration Type Documentation

Enumerator:
LED_OFF 
LED_BLINK 
LED_ON 
LED_UNDEFINED 

Definition at line 216 of file technisat-usb2.c.

Function Documentation

DVB_DEFINE_MOD_OPT_ADAPTER_NR ( adapter_nr  )
MODULE_AUTHOR ( "Patrick Boettcher <[email protected]>"  )
MODULE_DESCRIPTION ( "Driver for Technisat DVB-S/S2 USB 2.0 device )
MODULE_DEVICE_TABLE ( usb  ,
technisat_usb2_id_table   
)
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
module_param ( disable_led_control  ,
int  ,
0444   
)
MODULE_PARM_DESC ( debug  ,
"set debugging level (bit-mask: 1=info,2=eeprom,4=i2c,8=rc)."  DVB_USB_DEBUG_STATUS 
)
MODULE_PARM_DESC ( disable_led_control  ,
"disable LED control of the device ""(default: 0 - LED control is active)."   
)
module_usb_driver ( technisat_usb2_driver  )
MODULE_VERSION ( "1.0"  )