Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
ene_ir.h File Reference
#include <linux/spinlock.h>

Go to the source code of this file.

Data Structures

struct  ene_device
 

Macros

#define ENE_STATUS   0 /* hardware status - unused */
 
#define ENE_ADDR_HI   1 /* hi byte of register address */
 
#define ENE_ADDR_LO   2 /* low byte of register address */
 
#define ENE_IO   3 /* read/write window */
 
#define ENE_IO_SIZE   4
 
#define ENE_FW_SAMPLE_BUFFER   0xF8F0 /* sample buffer */
 
#define ENE_FW_SAMPLE_SPACE   0x80 /* sample is space */
 
#define ENE_FW_PACKET_SIZE   4
 
#define ENE_FW1   0xF8F8 /* flagr */
 
#define ENE_FW1_ENABLE   0x01 /* enable fw processing */
 
#define ENE_FW1_TXIRQ   0x02 /* TX interrupt pending */
 
#define ENE_FW1_HAS_EXTRA_BUF   0x04 /* fw uses extra buffer*/
 
#define ENE_FW1_EXTRA_BUF_HND   0x08 /* extra buffer handshake bit*/
 
#define ENE_FW1_LED_ON   0x10 /* turn on a led */
 
#define ENE_FW1_WPATTERN   0x20 /* enable wake pattern */
 
#define ENE_FW1_WAKE   0x40 /* enable wake from S3 */
 
#define ENE_FW1_IRQ   0x80 /* enable interrupt */
 
#define ENE_FW2   0xF8F9 /* flagw */
 
#define ENE_FW2_BUF_WPTR   0x01 /* which half of the buffer to read */
 
#define ENE_FW2_RXIRQ   0x04 /* RX IRQ pending*/
 
#define ENE_FW2_GP0A   0x08 /* Use GPIO0A for demodulated input */
 
#define ENE_FW2_EMMITER1_CONN   0x10 /* TX emmiter 1 connected */
 
#define ENE_FW2_EMMITER2_CONN   0x20 /* TX emmiter 2 connected */
 
#define ENE_FW2_FAN_INPUT   0x40 /* fan input used for demodulated data*/
 
#define ENE_FW2_LEARNING   0x80 /* hardware supports learning and TX */
 
#define ENE_FW_RX_POINTER   0xF8FA
 
#define ENE_FW_SMPL_BUF_FAN   0xF8FB
 
#define ENE_FW_SMPL_BUF_FAN_PLS   0x8000 /* combined sample is pulse */
 
#define ENE_FW_SMPL_BUF_FAN_MSK   0x0FFF /* combined sample maximum value */
 
#define ENE_FW_SAMPLE_PERIOD_FAN   61 /* fan input has fixed sample period */
 
#define ENE_GPIOFS1   0xFC01
 
#define ENE_GPIOFS1_GPIO0D   0x20 /* enable tx output on GPIO0D */
 
#define ENE_GPIOFS8   0xFC08
 
#define ENE_GPIOFS8_GPIO41   0x02 /* enable tx output on GPIO40 */
 
#define ENEB_IRQ   0xFD09 /* IRQ number */
 
#define ENEB_IRQ_UNK1   0xFD17 /* unknown setting = 1 */
 
#define ENEB_IRQ_STATUS   0xFD80 /* irq status */
 
#define ENEB_IRQ_STATUS_IR   0x20 /* IR irq */
 
#define ENE_FAN_AS_IN1   0xFE30 /* fan init reg 1 */
 
#define ENE_FAN_AS_IN1_EN   0xCD
 
#define ENE_FAN_AS_IN2   0xFE31 /* fan init reg 2 */
 
#define ENE_FAN_AS_IN2_EN   0x03
 
#define ENE_IRQ   0xFE9B /* new irq settings register */
 
#define ENE_IRQ_MASK   0x0F /* irq number mask */
 
#define ENE_IRQ_UNK_EN   0x10 /* always enabled */
 
#define ENE_IRQ_STATUS   0x20 /* irq status and ACK */
 
#define ENE_CIRCFG   0xFEC0
 
#define ENE_CIRCFG_RX_EN   0x01 /* RX enable */
 
#define ENE_CIRCFG_RX_IRQ   0x02 /* Enable hardware interrupt */
 
#define ENE_CIRCFG_REV_POL   0x04 /* Input polarity reversed */
 
#define ENE_CIRCFG_CARR_DEMOD   0x08 /* Enable carrier demodulator */
 
#define ENE_CIRCFG_TX_EN   0x10 /* TX enable */
 
#define ENE_CIRCFG_TX_IRQ   0x20 /* Send interrupt on TX done */
 
#define ENE_CIRCFG_TX_POL_REV   0x40 /* TX polarity reversed */
 
#define ENE_CIRCFG_TX_CARR   0x80 /* send TX carrier or not */
 
#define ENE_CIRCFG2   0xFEC1
 
#define ENE_CIRCFG2_RLC   0x00
 
#define ENE_CIRCFG2_RC5   0x01
 
#define ENE_CIRCFG2_RC6   0x02
 
#define ENE_CIRCFG2_NEC   0x03
 
#define ENE_CIRCFG2_CARR_DETECT   0x10 /* Enable carrier detection */
 
#define ENE_CIRCFG2_GPIO0A   0x20 /* Use GPIO0A instead of GPIO40 for input */
 
#define ENE_CIRCFG2_FAST_SAMPL1   0x40 /* Fast leading pulse detection for RC6 */
 
#define ENE_CIRCFG2_FAST_SAMPL2   0x80 /* Fast data detection for RC6 */
 
#define ENE_CIRPF   0xFEC2
 
#define ENE_CIRHIGH   0xFEC3
 
#define ENE_CIRBIT   0xFEC4
 
#define ENE_CIRSTART   0xFEC5
 
#define ENE_CIRSTART2   0xFEC6
 
#define ENE_CIRDAT_IN   0xFEC7
 
#define ENE_CIRRLC_CFG   0xFEC8
 
#define ENE_CIRRLC_CFG_OVERFLOW   0x80 /* interrupt on overflows if set */
 
#define ENE_DEFAULT_SAMPLE_PERIOD   50
 
#define ENE_CIRRLC_OUT0   0xFEC9
 
#define ENE_CIRRLC_OUT1   0xFECA
 
#define ENE_CIRRLC_OUT_PULSE   0x80 /* Transmitted sample is pulse */
 
#define ENE_CIRRLC_OUT_MASK   0x7F
 
#define ENE_CIRCAR_PULS   0xFECB
 
#define ENE_CIRCAR_PRD   0xFECC
 
#define ENE_CIRCAR_PRD_VALID   0x80 /* data valid content valid */
 
#define ENE_CIRCAR_HPRD   0xFECD
 
#define ENE_CIRMOD_PRD   0xFECE
 
#define ENE_CIRMOD_PRD_POL   0x80 /* TX carrier polarity*/
 
#define ENE_CIRMOD_PRD_MAX   0x7F /* 15.87 kHz */
 
#define ENE_CIRMOD_PRD_MIN   0x02 /* 1 Mhz */
 
#define ENE_CIRMOD_HPRD   0xFECF
 
#define ENE_ECHV   0xFF00 /* hardware revision */
 
#define ENE_PLLFRH   0xFF16
 
#define ENE_PLLFRL   0xFF17
 
#define ENE_DEFAULT_PLL_FREQ   1000
 
#define ENE_ECSTS   0xFF1D
 
#define ENE_ECSTS_RSRVD   0x04
 
#define ENE_ECVER_MAJOR   0xFF1E /* chip version */
 
#define ENE_ECVER_MINOR   0xFF1F
 
#define ENE_HW_VER_OLD   0xFD00
 
#define ENE_DRIVER_NAME   "ene_ir"
 
#define ENE_IRQ_RX   1
 
#define ENE_IRQ_TX   2
 
#define ENE_HW_B   1 /* 3926B */
 
#define ENE_HW_C   2 /* 3926C */
 
#define ENE_HW_D   3 /* 3926D or later */
 
#define __dbg(level, format,...)
 
#define dbg(format,...)   __dbg(1, format, ## __VA_ARGS__)
 
#define dbg_verbose(format,...)   __dbg(2, format, ## __VA_ARGS__)
 
#define dbg_regs(format,...)   __dbg(3, format, ## __VA_ARGS__)
 

Macro Definition Documentation

#define __dbg (   level,
  format,
  ... 
)
Value:
do { \
if (debug >= level) \
pr_debug(format "\n", ## __VA_ARGS__); \
} while (0)

Definition at line 185 of file ene_ir.h.

#define dbg (   format,
  ... 
)    __dbg(1, format, ## __VA_ARGS__)

Definition at line 191 of file ene_ir.h.

#define dbg_regs (   format,
  ... 
)    __dbg(3, format, ## __VA_ARGS__)

Definition at line 193 of file ene_ir.h.

#define dbg_verbose (   format,
  ... 
)    __dbg(2, format, ## __VA_ARGS__)

Definition at line 192 of file ene_ir.h.

#define ENE_ADDR_HI   1 /* hi byte of register address */

Definition at line 26 of file ene_ir.h.

#define ENE_ADDR_LO   2 /* low byte of register address */

Definition at line 27 of file ene_ir.h.

#define ENE_CIRBIT   0xFEC4

Definition at line 118 of file ene_ir.h.

#define ENE_CIRCAR_HPRD   0xFECD

Definition at line 149 of file ene_ir.h.

#define ENE_CIRCAR_PRD   0xFECC

Definition at line 145 of file ene_ir.h.

#define ENE_CIRCAR_PRD_VALID   0x80 /* data valid content valid */

Definition at line 146 of file ene_ir.h.

#define ENE_CIRCAR_PULS   0xFECB

Definition at line 142 of file ene_ir.h.

#define ENE_CIRCFG   0xFEC0

Definition at line 93 of file ene_ir.h.

#define ENE_CIRCFG2   0xFEC1

Definition at line 105 of file ene_ir.h.

#define ENE_CIRCFG2_CARR_DETECT   0x10 /* Enable carrier detection */

Definition at line 110 of file ene_ir.h.

#define ENE_CIRCFG2_FAST_SAMPL1   0x40 /* Fast leading pulse detection for RC6 */

Definition at line 112 of file ene_ir.h.

#define ENE_CIRCFG2_FAST_SAMPL2   0x80 /* Fast data detection for RC6 */

Definition at line 113 of file ene_ir.h.

#define ENE_CIRCFG2_GPIO0A   0x20 /* Use GPIO0A instead of GPIO40 for input */

Definition at line 111 of file ene_ir.h.

#define ENE_CIRCFG2_NEC   0x03

Definition at line 109 of file ene_ir.h.

#define ENE_CIRCFG2_RC5   0x01

Definition at line 107 of file ene_ir.h.

#define ENE_CIRCFG2_RC6   0x02

Definition at line 108 of file ene_ir.h.

#define ENE_CIRCFG2_RLC   0x00

Definition at line 106 of file ene_ir.h.

#define ENE_CIRCFG_CARR_DEMOD   0x08 /* Enable carrier demodulator */

Definition at line 97 of file ene_ir.h.

#define ENE_CIRCFG_REV_POL   0x04 /* Input polarity reversed */

Definition at line 96 of file ene_ir.h.

#define ENE_CIRCFG_RX_EN   0x01 /* RX enable */

Definition at line 94 of file ene_ir.h.

#define ENE_CIRCFG_RX_IRQ   0x02 /* Enable hardware interrupt */

Definition at line 95 of file ene_ir.h.

#define ENE_CIRCFG_TX_CARR   0x80 /* send TX carrier or not */

Definition at line 102 of file ene_ir.h.

#define ENE_CIRCFG_TX_EN   0x10 /* TX enable */

Definition at line 99 of file ene_ir.h.

#define ENE_CIRCFG_TX_IRQ   0x20 /* Send interrupt on TX done */

Definition at line 100 of file ene_ir.h.

#define ENE_CIRCFG_TX_POL_REV   0x40 /* TX polarity reversed */

Definition at line 101 of file ene_ir.h.

#define ENE_CIRDAT_IN   0xFEC7

Definition at line 123 of file ene_ir.h.

#define ENE_CIRHIGH   0xFEC3

Definition at line 117 of file ene_ir.h.

#define ENE_CIRMOD_HPRD   0xFECF

Definition at line 159 of file ene_ir.h.

#define ENE_CIRMOD_PRD   0xFECE

Definition at line 152 of file ene_ir.h.

#define ENE_CIRMOD_PRD_MAX   0x7F /* 15.87 kHz */

Definition at line 155 of file ene_ir.h.

#define ENE_CIRMOD_PRD_MIN   0x02 /* 1 Mhz */

Definition at line 156 of file ene_ir.h.

#define ENE_CIRMOD_PRD_POL   0x80 /* TX carrier polarity*/

Definition at line 153 of file ene_ir.h.

#define ENE_CIRPF   0xFEC2

Definition at line 116 of file ene_ir.h.

#define ENE_CIRRLC_CFG   0xFEC8

Definition at line 127 of file ene_ir.h.

#define ENE_CIRRLC_CFG_OVERFLOW   0x80 /* interrupt on overflows if set */

Definition at line 128 of file ene_ir.h.

#define ENE_CIRRLC_OUT0   0xFEC9

Definition at line 132 of file ene_ir.h.

#define ENE_CIRRLC_OUT1   0xFECA

Definition at line 133 of file ene_ir.h.

#define ENE_CIRRLC_OUT_MASK   0x7F

Definition at line 135 of file ene_ir.h.

#define ENE_CIRRLC_OUT_PULSE   0x80 /* Transmitted sample is pulse */

Definition at line 134 of file ene_ir.h.

#define ENE_CIRSTART   0xFEC5

Definition at line 119 of file ene_ir.h.

#define ENE_CIRSTART2   0xFEC6

Definition at line 120 of file ene_ir.h.

#define ENE_DEFAULT_PLL_FREQ   1000

Definition at line 165 of file ene_ir.h.

#define ENE_DEFAULT_SAMPLE_PERIOD   50

Definition at line 129 of file ene_ir.h.

#define ENE_DRIVER_NAME   "ene_ir"

Definition at line 176 of file ene_ir.h.

#define ENE_ECHV   0xFF00 /* hardware revision */

Definition at line 162 of file ene_ir.h.

#define ENE_ECSTS   0xFF1D

Definition at line 167 of file ene_ir.h.

#define ENE_ECSTS_RSRVD   0x04

Definition at line 168 of file ene_ir.h.

#define ENE_ECVER_MAJOR   0xFF1E /* chip version */

Definition at line 170 of file ene_ir.h.

#define ENE_ECVER_MINOR   0xFF1F

Definition at line 171 of file ene_ir.h.

#define ENE_FAN_AS_IN1   0xFE30 /* fan init reg 1 */

Definition at line 81 of file ene_ir.h.

#define ENE_FAN_AS_IN1_EN   0xCD

Definition at line 82 of file ene_ir.h.

#define ENE_FAN_AS_IN2   0xFE31 /* fan init reg 2 */

Definition at line 83 of file ene_ir.h.

#define ENE_FAN_AS_IN2_EN   0x03

Definition at line 84 of file ene_ir.h.

#define ENE_FW1   0xF8F8 /* flagr */

Definition at line 37 of file ene_ir.h.

#define ENE_FW1_ENABLE   0x01 /* enable fw processing */

Definition at line 38 of file ene_ir.h.

#define ENE_FW1_EXTRA_BUF_HND   0x08 /* extra buffer handshake bit*/

Definition at line 41 of file ene_ir.h.

#define ENE_FW1_HAS_EXTRA_BUF   0x04 /* fw uses extra buffer*/

Definition at line 40 of file ene_ir.h.

#define ENE_FW1_IRQ   0x80 /* enable interrupt */

Definition at line 46 of file ene_ir.h.

#define ENE_FW1_LED_ON   0x10 /* turn on a led */

Definition at line 42 of file ene_ir.h.

#define ENE_FW1_TXIRQ   0x02 /* TX interrupt pending */

Definition at line 39 of file ene_ir.h.

#define ENE_FW1_WAKE   0x40 /* enable wake from S3 */

Definition at line 45 of file ene_ir.h.

#define ENE_FW1_WPATTERN   0x20 /* enable wake pattern */

Definition at line 44 of file ene_ir.h.

#define ENE_FW2   0xF8F9 /* flagw */

Definition at line 49 of file ene_ir.h.

#define ENE_FW2_BUF_WPTR   0x01 /* which half of the buffer to read */

Definition at line 50 of file ene_ir.h.

#define ENE_FW2_EMMITER1_CONN   0x10 /* TX emmiter 1 connected */

Definition at line 53 of file ene_ir.h.

#define ENE_FW2_EMMITER2_CONN   0x20 /* TX emmiter 2 connected */

Definition at line 54 of file ene_ir.h.

#define ENE_FW2_FAN_INPUT   0x40 /* fan input used for demodulated data*/

Definition at line 56 of file ene_ir.h.

#define ENE_FW2_GP0A   0x08 /* Use GPIO0A for demodulated input */

Definition at line 52 of file ene_ir.h.

#define ENE_FW2_LEARNING   0x80 /* hardware supports learning and TX */

Definition at line 57 of file ene_ir.h.

#define ENE_FW2_RXIRQ   0x04 /* RX IRQ pending*/

Definition at line 51 of file ene_ir.h.

#define ENE_FW_PACKET_SIZE   4

Definition at line 34 of file ene_ir.h.

#define ENE_FW_RX_POINTER   0xF8FA

Definition at line 60 of file ene_ir.h.

#define ENE_FW_SAMPLE_BUFFER   0xF8F0 /* sample buffer */

Definition at line 32 of file ene_ir.h.

#define ENE_FW_SAMPLE_PERIOD_FAN   61 /* fan input has fixed sample period */

Definition at line 66 of file ene_ir.h.

#define ENE_FW_SAMPLE_SPACE   0x80 /* sample is space */

Definition at line 33 of file ene_ir.h.

#define ENE_FW_SMPL_BUF_FAN   0xF8FB

Definition at line 63 of file ene_ir.h.

#define ENE_FW_SMPL_BUF_FAN_MSK   0x0FFF /* combined sample maximum value */

Definition at line 65 of file ene_ir.h.

#define ENE_FW_SMPL_BUF_FAN_PLS   0x8000 /* combined sample is pulse */

Definition at line 64 of file ene_ir.h.

#define ENE_GPIOFS1   0xFC01

Definition at line 69 of file ene_ir.h.

#define ENE_GPIOFS1_GPIO0D   0x20 /* enable tx output on GPIO0D */

Definition at line 70 of file ene_ir.h.

#define ENE_GPIOFS8   0xFC08

Definition at line 71 of file ene_ir.h.

#define ENE_GPIOFS8_GPIO41   0x02 /* enable tx output on GPIO40 */

Definition at line 72 of file ene_ir.h.

#define ENE_HW_B   1 /* 3926B */

Definition at line 181 of file ene_ir.h.

#define ENE_HW_C   2 /* 3926C */

Definition at line 182 of file ene_ir.h.

#define ENE_HW_D   3 /* 3926D or later */

Definition at line 183 of file ene_ir.h.

#define ENE_HW_VER_OLD   0xFD00

Definition at line 172 of file ene_ir.h.

#define ENE_IO   3 /* read/write window */

Definition at line 28 of file ene_ir.h.

#define ENE_IO_SIZE   4

Definition at line 29 of file ene_ir.h.

#define ENE_IRQ   0xFE9B /* new irq settings register */

Definition at line 87 of file ene_ir.h.

#define ENE_IRQ_MASK   0x0F /* irq number mask */

Definition at line 88 of file ene_ir.h.

#define ENE_IRQ_RX   1

Definition at line 178 of file ene_ir.h.

#define ENE_IRQ_STATUS   0x20 /* irq status and ACK */

Definition at line 90 of file ene_ir.h.

#define ENE_IRQ_TX   2

Definition at line 179 of file ene_ir.h.

#define ENE_IRQ_UNK_EN   0x10 /* always enabled */

Definition at line 89 of file ene_ir.h.

#define ENE_PLLFRH   0xFF16

Definition at line 163 of file ene_ir.h.

#define ENE_PLLFRL   0xFF17

Definition at line 164 of file ene_ir.h.

#define ENE_STATUS   0 /* hardware status - unused */

Definition at line 25 of file ene_ir.h.

#define ENEB_IRQ   0xFD09 /* IRQ number */

Definition at line 75 of file ene_ir.h.

#define ENEB_IRQ_STATUS   0xFD80 /* irq status */

Definition at line 77 of file ene_ir.h.

#define ENEB_IRQ_STATUS_IR   0x20 /* IR irq */

Definition at line 78 of file ene_ir.h.

#define ENEB_IRQ_UNK1   0xFD17 /* unknown setting = 1 */

Definition at line 76 of file ene_ir.h.