Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dm1105.c File Reference
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include <media/rc-core.h>
#include "demux.h"
#include "dmxdev.h"
#include "dvb_demux.h"
#include "dvb_frontend.h"
#include "dvb_net.h"
#include "dvbdev.h"
#include "dvb-pll.h"
#include "stv0299.h"
#include "stv0288.h"
#include "stb6000.h"
#include "si21xx.h"
#include "cx24116.h"
#include "z0194a.h"
#include "ds3000.h"

Go to the source code of this file.

Data Structures

struct  dm1105_board
 
struct  dm1105_subid
 
struct  infrared
 
struct  dm1105_dev
 

Macros

#define MODULE_NAME   "dm1105"
 
#define UNSET   (-1U)
 
#define DM1105_BOARD_NOAUTO   UNSET
 
#define DM1105_BOARD_UNKNOWN   0
 
#define DM1105_BOARD_DVBWORLD_2002   1
 
#define DM1105_BOARD_DVBWORLD_2004   2
 
#define DM1105_BOARD_AXESS_DM05   3
 
#define DM1105_BOARD_UNBRANDED_I2C_ON_GPIO   4
 
#define PCI_VENDOR_ID_TRIGEM   0x109f
 
#define PCI_VENDOR_ID_AXESS   0x195d
 
#define PCI_DEVICE_ID_DM1105   0x036f
 
#define PCI_DEVICE_ID_DW2002   0x2002
 
#define PCI_DEVICE_ID_DW2004   0x2004
 
#define PCI_DEVICE_ID_DM05   0x1105
 
#define DM1105_TSCTR   0x00
 
#define DM1105_DTALENTH   0x04
 
#define DM1105_GPIOVAL   0x08
 
#define DM1105_GPIOCTR   0x0c
 
#define DM1105_PIDN   0x10
 
#define DM1105_CWSEL   0x14
 
#define DM1105_HOST_CTR   0x18
 
#define DM1105_HOST_AD   0x1c
 
#define DM1105_CR   0x30
 
#define DM1105_RST   0x34
 
#define DM1105_STADR   0x38
 
#define DM1105_RLEN   0x3c
 
#define DM1105_WRP   0x40
 
#define DM1105_INTCNT   0x44
 
#define DM1105_INTMAK   0x48
 
#define DM1105_INTSTS   0x4c
 
#define DM1105_ODD   0x50
 
#define DM1105_EVEN   0x58
 
#define DM1105_PID   0x60
 
#define DM1105_IRCTR   0x64
 
#define DM1105_IRMODE   0x68
 
#define DM1105_SYSTEMCODE   0x6c
 
#define DM1105_IRCODE   0x70
 
#define DM1105_ENCRYPT   0x74
 
#define DM1105_VER   0x7c
 
#define DM1105_I2CCTR   0x80
 
#define DM1105_I2CSTS   0x81
 
#define DM1105_I2CDAT   0x82
 
#define DM1105_I2C_RA   0x83
 
#define INTMAK_TSIRQM   0x01
 
#define INTMAK_HIRQM   0x04
 
#define INTMAK_IRM   0x08
 
#define INTMAK_ALLMASK
 
#define INTMAK_NONEMASK   0x00
 
#define INTSTS_TSIRQ   0x01
 
#define INTSTS_HIRQ   0x04
 
#define INTSTS_IR   0x08
 
#define DM1105_IR_EN   0x01
 
#define DM1105_SYS_CHK   0x02
 
#define DM1105_REP_FLG   0x08
 
#define IIC_24C01_addr   0xa0
 
#define DM1105_MAX   0x04
 
#define DRIVER_NAME   "dm1105"
 
#define DM1105_I2C_GPIO_NAME   "dm1105-gpio"
 
#define DM1105_DMA_PACKETS   47
 
#define DM1105_DMA_PACKET_LENGTH   (128*4)
 
#define DM1105_DMA_BYTES   (128 * 4 * DM1105_DMA_PACKETS)
 
#define GPIO08   (1 << 8)
 
#define GPIO13   (1 << 13)
 
#define GPIO14   (1 << 14)
 
#define GPIO15   (1 << 15)
 
#define GPIO16   (1 << 16)
 
#define GPIO17   (1 << 17)
 
#define GPIO_ALL   0x03ffff
 
#define DM1105_LNB_MASK   (GPIO_ALL & ~(GPIO14 | GPIO13))
 
#define DM1105_LNB_OFF   GPIO17
 
#define DM1105_LNB_13V   (GPIO16 | GPIO08)
 
#define DM1105_LNB_18V   GPIO08
 
#define DM05_LNB_MASK   (GPIO_ALL & ~(GPIO14 | GPIO13))
 
#define DM05_LNB_OFF   GPIO17/* actually 13v */
 
#define DM05_LNB_13V   GPIO17
 
#define DM05_LNB_18V   (GPIO17 | GPIO16)
 
#define UNBR_LNB_MASK   (GPIO17 | GPIO16)
 
#define UNBR_LNB_OFF   0
 
#define UNBR_LNB_13V   GPIO17
 
#define UNBR_LNB_18V   (GPIO17 | GPIO16)
 
#define dm_io_mem(reg)   ((unsigned long)(&dev->io_mem[reg]))
 
#define dm_readb(reg)   inb(dm_io_mem(reg))
 
#define dm_writeb(reg, value)   outb((value), (dm_io_mem(reg)))
 
#define dm_readw(reg)   inw(dm_io_mem(reg))
 
#define dm_writew(reg, value)   outw((value), (dm_io_mem(reg)))
 
#define dm_readl(reg)   inl(dm_io_mem(reg))
 
#define dm_writel(reg, value)   outl((value), (dm_io_mem(reg)))
 
#define dm_andorl(reg, mask, value)
 
#define dm_setl(reg, bit)   dm_andorl((reg), (bit), (bit))
 
#define dm_clearl(reg, bit)   dm_andorl((reg), (bit), 0)
 

Functions

 module_param_array (card, int, NULL, 0444)
 
 MODULE_PARM_DESC (card,"card type")
 
 module_param (ir_debug, int, 0644)
 
 MODULE_PARM_DESC (ir_debug,"enable debugging information for IR decoding")
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR (adapter_nr)
 
int __devinit dm1105_ir_init (struct dm1105_dev *dm1105)
 
void __devexit dm1105_ir_exit (struct dm1105_dev *dm1105)
 
 MODULE_DEVICE_TABLE (pci, dm1105_id_table)
 
 module_init (dm1105_init)
 
 module_exit (dm1105_exit)
 
 MODULE_AUTHOR ("Igor M. Liplianin <liplianin@me.by>")
 
 MODULE_DESCRIPTION ("SDMC DM1105 DVB driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DM05_LNB_13V   GPIO17

Definition at line 187 of file dm1105.c.

#define DM05_LNB_18V   (GPIO17 | GPIO16)

Definition at line 188 of file dm1105.c.

#define DM05_LNB_MASK   (GPIO_ALL & ~(GPIO14 | GPIO13))

Definition at line 185 of file dm1105.c.

#define DM05_LNB_OFF   GPIO17/* actually 13v */

Definition at line 186 of file dm1105.c.

#define DM1105_BOARD_AXESS_DM05   3

Definition at line 58 of file dm1105.c.

#define DM1105_BOARD_DVBWORLD_2002   1

Definition at line 56 of file dm1105.c.

#define DM1105_BOARD_DVBWORLD_2004   2

Definition at line 57 of file dm1105.c.

#define DM1105_BOARD_NOAUTO   UNSET

Definition at line 54 of file dm1105.c.

#define DM1105_BOARD_UNBRANDED_I2C_ON_GPIO   4

Definition at line 59 of file dm1105.c.

#define DM1105_BOARD_UNKNOWN   0

Definition at line 55 of file dm1105.c.

#define DM1105_CR   0x30

Definition at line 105 of file dm1105.c.

#define DM1105_CWSEL   0x14

Definition at line 98 of file dm1105.c.

#define DM1105_DMA_BYTES   (128 * 4 * DM1105_DMA_PACKETS)

Definition at line 167 of file dm1105.c.

#define DM1105_DMA_PACKET_LENGTH   (128*4)

Definition at line 166 of file dm1105.c.

#define DM1105_DMA_PACKETS   47

Definition at line 165 of file dm1105.c.

#define DM1105_DTALENTH   0x04

Definition at line 88 of file dm1105.c.

#define DM1105_ENCRYPT   0x74

Definition at line 128 of file dm1105.c.

#define DM1105_EVEN   0x58

Definition at line 116 of file dm1105.c.

#define DM1105_GPIOCTR   0x0c

Definition at line 92 of file dm1105.c.

#define DM1105_GPIOVAL   0x08

Definition at line 91 of file dm1105.c.

#define DM1105_HOST_AD   0x1c

Definition at line 102 of file dm1105.c.

#define DM1105_HOST_CTR   0x18

Definition at line 101 of file dm1105.c.

#define DM1105_I2C_GPIO_NAME   "dm1105-gpio"

Definition at line 163 of file dm1105.c.

#define DM1105_I2C_RA   0x83

Definition at line 135 of file dm1105.c.

#define DM1105_I2CCTR   0x80

Definition at line 132 of file dm1105.c.

#define DM1105_I2CDAT   0x82

Definition at line 134 of file dm1105.c.

#define DM1105_I2CSTS   0x81

Definition at line 133 of file dm1105.c.

#define DM1105_INTCNT   0x44

Definition at line 110 of file dm1105.c.

#define DM1105_INTMAK   0x48

Definition at line 111 of file dm1105.c.

#define DM1105_INTSTS   0x4c

Definition at line 112 of file dm1105.c.

#define DM1105_IR_EN   0x01

Definition at line 153 of file dm1105.c.

#define DM1105_IRCODE   0x70

Definition at line 125 of file dm1105.c.

#define DM1105_IRCTR   0x64

Definition at line 122 of file dm1105.c.

#define DM1105_IRMODE   0x68

Definition at line 123 of file dm1105.c.

#define DM1105_LNB_13V   (GPIO16 | GPIO08)

Definition at line 181 of file dm1105.c.

#define DM1105_LNB_18V   GPIO08

Definition at line 182 of file dm1105.c.

#define DM1105_LNB_MASK   (GPIO_ALL & ~(GPIO14 | GPIO13))

Definition at line 179 of file dm1105.c.

#define DM1105_LNB_OFF   GPIO17

Definition at line 180 of file dm1105.c.

#define DM1105_MAX   0x04

Definition at line 160 of file dm1105.c.

#define DM1105_ODD   0x50

Definition at line 115 of file dm1105.c.

#define DM1105_PID   0x60

Definition at line 119 of file dm1105.c.

#define DM1105_PIDN   0x10

Definition at line 95 of file dm1105.c.

#define DM1105_REP_FLG   0x08

Definition at line 155 of file dm1105.c.

#define DM1105_RLEN   0x3c

Definition at line 108 of file dm1105.c.

#define DM1105_RST   0x34

Definition at line 106 of file dm1105.c.

#define DM1105_STADR   0x38

Definition at line 107 of file dm1105.c.

#define DM1105_SYS_CHK   0x02

Definition at line 154 of file dm1105.c.

#define DM1105_SYSTEMCODE   0x6c

Definition at line 124 of file dm1105.c.

#define DM1105_TSCTR   0x00

Definition at line 87 of file dm1105.c.

#define DM1105_VER   0x7c

Definition at line 129 of file dm1105.c.

#define DM1105_WRP   0x40

Definition at line 109 of file dm1105.c.

#define dm_andorl (   reg,
  mask,
  value 
)
Value:
outl((inl(dm_io_mem(reg)) & ~(mask)) |\
((value) & (mask)), (dm_io_mem(reg)))

Definition at line 384 of file dm1105.c.

#define dm_clearl (   reg,
  bit 
)    dm_andorl((reg), (bit), 0)

Definition at line 389 of file dm1105.c.

#define dm_io_mem (   reg)    ((unsigned long)(&dev->io_mem[reg]))

Definition at line 373 of file dm1105.c.

#define dm_readb (   reg)    inb(dm_io_mem(reg))

Definition at line 375 of file dm1105.c.

#define dm_readl (   reg)    inl(dm_io_mem(reg))

Definition at line 381 of file dm1105.c.

#define dm_readw (   reg)    inw(dm_io_mem(reg))

Definition at line 378 of file dm1105.c.

#define dm_setl (   reg,
  bit 
)    dm_andorl((reg), (bit), (bit))

Definition at line 388 of file dm1105.c.

#define dm_writeb (   reg,
  value 
)    outb((value), (dm_io_mem(reg)))

Definition at line 376 of file dm1105.c.

#define dm_writel (   reg,
  value 
)    outl((value), (dm_io_mem(reg)))

Definition at line 382 of file dm1105.c.

#define dm_writew (   reg,
  value 
)    outw((value), (dm_io_mem(reg)))

Definition at line 379 of file dm1105.c.

#define DRIVER_NAME   "dm1105"

Definition at line 162 of file dm1105.c.

#define GPIO08   (1 << 8)

Definition at line 170 of file dm1105.c.

#define GPIO13   (1 << 13)

Definition at line 171 of file dm1105.c.

#define GPIO14   (1 << 14)

Definition at line 172 of file dm1105.c.

#define GPIO15   (1 << 15)

Definition at line 173 of file dm1105.c.

#define GPIO16   (1 << 16)

Definition at line 174 of file dm1105.c.

#define GPIO17   (1 << 17)

Definition at line 175 of file dm1105.c.

#define GPIO_ALL   0x03ffff

Definition at line 176 of file dm1105.c.

#define IIC_24C01_addr   0xa0

Definition at line 158 of file dm1105.c.

#define INTMAK_ALLMASK
Value:
INTMAK_HIRQM | \
INTMAK_IRM)

Definition at line 142 of file dm1105.c.

#define INTMAK_HIRQM   0x04

Definition at line 140 of file dm1105.c.

#define INTMAK_IRM   0x08

Definition at line 141 of file dm1105.c.

#define INTMAK_NONEMASK   0x00

Definition at line 145 of file dm1105.c.

#define INTMAK_TSIRQM   0x01

Definition at line 139 of file dm1105.c.

#define INTSTS_HIRQ   0x04

Definition at line 149 of file dm1105.c.

#define INTSTS_IR   0x08

Definition at line 150 of file dm1105.c.

#define INTSTS_TSIRQ   0x01

Definition at line 148 of file dm1105.c.

#define MODULE_NAME   "dm1105"

Definition at line 50 of file dm1105.c.

#define PCI_DEVICE_ID_DM05   0x1105

Definition at line 81 of file dm1105.c.

#define PCI_DEVICE_ID_DM1105   0x036f

Definition at line 72 of file dm1105.c.

#define PCI_DEVICE_ID_DW2002   0x2002

Definition at line 75 of file dm1105.c.

#define PCI_DEVICE_ID_DW2004   0x2004

Definition at line 78 of file dm1105.c.

#define PCI_VENDOR_ID_AXESS   0x195d

Definition at line 69 of file dm1105.c.

#define PCI_VENDOR_ID_TRIGEM   0x109f

Definition at line 66 of file dm1105.c.

#define UNBR_LNB_13V   GPIO17

Definition at line 193 of file dm1105.c.

#define UNBR_LNB_18V   (GPIO17 | GPIO16)

Definition at line 194 of file dm1105.c.

#define UNBR_LNB_MASK   (GPIO17 | GPIO16)

Definition at line 191 of file dm1105.c.

#define UNBR_LNB_OFF   0

Definition at line 192 of file dm1105.c.

#define UNSET   (-1U)

Definition at line 52 of file dm1105.c.

Function Documentation

void __devexit dm1105_ir_exit ( struct dm1105_dev dm1105)

Definition at line 779 of file dm1105.c.

int __devinit dm1105_ir_init ( struct dm1105_dev dm1105)

Definition at line 739 of file dm1105.c.

DVB_DEFINE_MOD_OPT_ADAPTER_NR ( adapter_nr  )
MODULE_AUTHOR ( "Igor M. Liplianin <liplianin@me.by>"  )
MODULE_DESCRIPTION ( "SDMC DM1105 DVB driver )
MODULE_DEVICE_TABLE ( pci  ,
dm1105_id_table   
)
module_exit ( dm1105_exit  )
module_init ( dm1105_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( ir_debug  ,
int  ,
0644   
)
module_param_array ( card  ,
int  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( card  ,
"card type  
)
MODULE_PARM_DESC ( ir_debug  ,
"enable debugging information for IR decoding"   
)