#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/time.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/usb.h>
#include <linux/crc32.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <net/irda/irda.h>
#include <net/irda/irda_device.h>
#include <net/irda/wrapper.h>
#include <net/irda/crc.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
Go to the source code of this file.
|
enum | FirChars { FIR_CE = 0x7d,
FIR_XBOF = 0x7f,
FIR_EOF = 0x7e
} |
|
enum | StirRequests { REQ_WRITE_REG = 0x00,
REQ_READ_REG = 0x01,
REQ_READ_ROM = 0x02,
REQ_WRITE_SINGLE = 0x03
} |
|
enum | StirRegs {
REG_RSVD =0,
REG_MODE,
REG_PDCLK,
REG_CTRL1,
REG_CTRL2,
REG_FIFOCTL,
REG_FIFOLSB,
REG_FIFOMSB,
REG_DPLL,
REG_IRDIG,
REG_TEST =15
} |
|
enum | StirModeMask {
MODE_FIR = 0x80,
MODE_SIR = 0x20,
MODE_ASK = 0x10,
MODE_FASTRX = 0x08,
MODE_FFRSTEN = 0x04,
MODE_NRESET = 0x02,
MODE_2400 = 0x01
} |
|
enum | StirPdclkMask {
PDCLK_4000000 = 0x02,
PDCLK_115200 = 0x09,
PDCLK_57600 = 0x13,
PDCLK_38400 = 0x1D,
PDCLK_19200 = 0x3B,
PDCLK_9600 = 0x77,
PDCLK_2400 = 0xDF
} |
|
enum | StirCtrl1Mask {
CTRL1_SDMODE = 0x80,
CTRL1_RXSLOW = 0x40,
CTRL1_TXPWD = 0x10,
CTRL1_RXPWD = 0x08,
CTRL1_SRESET = 0x01
} |
|
enum | StirCtrl2Mask { CTRL2_SPWIDTH = 0x08,
CTRL2_REVID = 0x03
} |
|
enum | StirFifoCtlMask { FIFOCTL_DIR = 0x10,
FIFOCTL_CLR = 0x08,
FIFOCTL_EMPTY = 0x04
} |
|
enum | StirDiagMask { IRDIG_RXHIGH = 0x80,
IRDIG_RXLOW = 0x40
} |
|
enum | StirTestMask {
TEST_PLLDOWN = 0x80,
TEST_LOOPIR = 0x40,
TEST_LOOPUSB = 0x20,
TEST_TSTENA = 0x10,
TEST_TSTOSC = 0x0F
} |
|
|
| MODULE_AUTHOR ("Stephen Hemminger <[email protected]>") |
|
| MODULE_DESCRIPTION ("IrDA-USB Dongle Driver for SigmaTel STIr4200") |
|
| MODULE_LICENSE ("GPL") |
|
| module_param (qos_mtt_bits, int, 0) |
|
| MODULE_PARM_DESC (qos_mtt_bits,"Minimum Turn Time") |
|
| module_param (rx_sensitivity, int, 0) |
|
| MODULE_PARM_DESC (rx_sensitivity,"Set Receiver sensitivity (0-6, 0 is most sensitive)") |
|
| module_param (tx_power, int, 0) |
|
| MODULE_PARM_DESC (tx_power,"Set Transmitter power (0-3, 0 is highest power)") |
|
| MODULE_DEVICE_TABLE (usb, dongles) |
|
| module_usb_driver (irda_driver) |
|
#define CTRL_TIMEOUT 100 /* milliseconds */ |
#define STIR_FIFO_SIZE 4096 |
#define STIR_IRDA_HEADER 4 |
#define TRANSMIT_TIMEOUT 200 /* milliseconds */ |
- Enumerator:
CTRL1_SDMODE |
|
CTRL1_RXSLOW |
|
CTRL1_TXPWD |
|
CTRL1_RXPWD |
|
CTRL1_SRESET |
|
Definition at line 131 of file stir4200.c.
- Enumerator:
CTRL2_SPWIDTH |
|
CTRL2_REVID |
|
Definition at line 139 of file stir4200.c.
- Enumerator:
FIFOCTL_DIR |
|
FIFOCTL_CLR |
|
FIFOCTL_EMPTY |
|
Definition at line 144 of file stir4200.c.
- Enumerator:
MODE_FIR |
|
MODE_SIR |
|
MODE_ASK |
|
MODE_FASTRX |
|
MODE_FFRSTEN |
|
MODE_NRESET |
|
MODE_2400 |
|
Definition at line 111 of file stir4200.c.
- Enumerator:
PDCLK_4000000 |
|
PDCLK_115200 |
|
PDCLK_57600 |
|
PDCLK_38400 |
|
PDCLK_19200 |
|
PDCLK_9600 |
|
PDCLK_2400 |
|
Definition at line 121 of file stir4200.c.
- Enumerator:
REG_RSVD |
|
REG_MODE |
|
REG_PDCLK |
|
REG_CTRL1 |
|
REG_CTRL2 |
|
REG_FIFOCTL |
|
REG_FIFOLSB |
|
REG_FIFOMSB |
|
REG_DPLL |
|
REG_IRDIG |
|
REG_TEST |
|
Definition at line 97 of file stir4200.c.
- Enumerator:
REQ_WRITE_REG |
|
REQ_READ_REG |
|
REQ_READ_ROM |
|
REQ_WRITE_SINGLE |
|
Definition at line 89 of file stir4200.c.
- Enumerator:
TEST_PLLDOWN |
|
TEST_LOOPIR |
|
TEST_LOOPUSB |
|
TEST_TSTENA |
|
TEST_TSTOSC |
|
Definition at line 155 of file stir4200.c.
MODULE_DESCRIPTION |
( |
"IrDA-USB Dongle Driver for SigmaTel STIr4200" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
usb |
, |
|
|
dongles |
|
|
) |
| |
module_param |
( |
qos_mtt_bits |
, |
|
|
int |
, |
|
|
0 |
|
|
) |
| |
module_param |
( |
rx_sensitivity |
, |
|
|
int |
, |
|
|
0 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
qos_mtt_bits |
, |
|
|
"Minimum Turn Time" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
rx_sensitivity |
, |
|
|
"Set Receiver sensitivity (0-6, 0 is most sensitive)" |
|
|
) |
| |
module_usb_driver |
( |
irda_driver |
| ) |
|