Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
atmel-wm97xx.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/wm97xx.h>
#include <linux/timer.h>
#include <linux/gpio.h>
#include <linux/io.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  continuous
 
struct  atmel_wm97xx
 

Macros

#define AC97C_ICA   0x10
 
#define AC97C_CBRHR   0x30
 
#define AC97C_CBSR   0x38
 
#define AC97C_CBMR   0x3c
 
#define AC97C_IER   0x54
 
#define AC97C_IDR   0x58
 
#define AC97C_RXRDY   (1 << 4)
 
#define AC97C_OVRUN   (1 << 5)
 
#define AC97C_CMR_SIZE_20   (0 << 16)
 
#define AC97C_CMR_SIZE_18   (1 << 16)
 
#define AC97C_CMR_SIZE_16   (2 << 16)
 
#define AC97C_CMR_SIZE_10   (3 << 16)
 
#define AC97C_CMR_CEM_LITTLE   (1 << 18)
 
#define AC97C_CMR_CEM_BIG   (0 << 18)
 
#define AC97C_CMR_CENA   (1 << 21)
 
#define AC97C_INT_CBEVT   (1 << 4)
 
#define AC97C_SR_CAEVT   (1 << 3)
 
#define AC97C_CH_MASK(slot)   (0x7 << (3 * (slot - 3)))
 
#define AC97C_CH_ASSIGN(slot, channel)   (AC97C_CHANNEL_##channel << (3 * (slot - 3)))
 
#define AC97C_CHANNEL_NONE   0x0
 
#define AC97C_CHANNEL_B   0x2
 
#define ac97c_writel(chip, reg, val)   __raw_writel((val), (chip)->regs + AC97C_##reg)
 
#define ac97c_readl(chip, reg)   __raw_readl((chip)->regs + AC97C_##reg)
 
#define WM_READS(sp)   ((sp / HZ) + 1)
 

Functions

 module_param (cont_rate, int, 0)
 
 MODULE_PARM_DESC (cont_rate,"Sampling rate in continuous mode (Hz)")
 
 module_param (pen_int, int, 0)
 
 MODULE_PARM_DESC (pen_int,"Pen down detection (1 = interrupt, 0 = polling)")
 
 module_param (pressure, int, 0)
 
 MODULE_PARM_DESC (pressure,"Pressure readback (1 = pressure, 0 = no pressure)")
 
 module_param (ac97_touch_slot, int, 0)
 
 MODULE_PARM_DESC (ac97_touch_slot,"Touch screen data slot AC97 number")
 
 module_param (atmel_gpio_line, int, 0)
 
 MODULE_PARM_DESC (atmel_gpio_line,"GPIO line number connected to WM97xx")
 
 module_init (atmel_wm97xx_init)
 
 module_exit (atmel_wm97xx_exit)
 
 MODULE_AUTHOR ("Hans-Christian Egtvedt <egtvedt@samfundet.no>")
 
 MODULE_DESCRIPTION ("wm97xx continuous touch driver for Atmel AT91 and AVR32")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AC97C_CBMR   0x3c

Definition at line 27 of file atmel-wm97xx.c.

#define AC97C_CBRHR   0x30

Definition at line 25 of file atmel-wm97xx.c.

#define AC97C_CBSR   0x38

Definition at line 26 of file atmel-wm97xx.c.

#define AC97C_CH_ASSIGN (   slot,
  channel 
)    (AC97C_CHANNEL_##channel << (3 * (slot - 3)))

Definition at line 48 of file atmel-wm97xx.c.

#define AC97C_CH_MASK (   slot)    (0x7 << (3 * (slot - 3)))

Definition at line 46 of file atmel-wm97xx.c.

#define AC97C_CHANNEL_B   0x2

Definition at line 51 of file atmel-wm97xx.c.

#define AC97C_CHANNEL_NONE   0x0

Definition at line 50 of file atmel-wm97xx.c.

#define AC97C_CMR_CEM_BIG   (0 << 18)

Definition at line 39 of file atmel-wm97xx.c.

#define AC97C_CMR_CEM_LITTLE   (1 << 18)

Definition at line 38 of file atmel-wm97xx.c.

#define AC97C_CMR_CENA   (1 << 21)

Definition at line 40 of file atmel-wm97xx.c.

#define AC97C_CMR_SIZE_10   (3 << 16)

Definition at line 37 of file atmel-wm97xx.c.

#define AC97C_CMR_SIZE_16   (2 << 16)

Definition at line 36 of file atmel-wm97xx.c.

#define AC97C_CMR_SIZE_18   (1 << 16)

Definition at line 35 of file atmel-wm97xx.c.

#define AC97C_CMR_SIZE_20   (0 << 16)

Definition at line 34 of file atmel-wm97xx.c.

#define AC97C_ICA   0x10

Definition at line 24 of file atmel-wm97xx.c.

#define AC97C_IDR   0x58

Definition at line 29 of file atmel-wm97xx.c.

#define AC97C_IER   0x54

Definition at line 28 of file atmel-wm97xx.c.

#define AC97C_INT_CBEVT   (1 << 4)

Definition at line 42 of file atmel-wm97xx.c.

#define AC97C_OVRUN   (1 << 5)

Definition at line 32 of file atmel-wm97xx.c.

#define ac97c_readl (   chip,
  reg 
)    __raw_readl((chip)->regs + AC97C_##reg)

Definition at line 55 of file atmel-wm97xx.c.

#define AC97C_RXRDY   (1 << 4)

Definition at line 31 of file atmel-wm97xx.c.

#define AC97C_SR_CAEVT   (1 << 3)

Definition at line 44 of file atmel-wm97xx.c.

#define ac97c_writel (   chip,
  reg,
  val 
)    __raw_writel((val), (chip)->regs + AC97C_##reg)

Definition at line 53 of file atmel-wm97xx.c.

#define WM_READS (   sp)    ((sp / HZ) + 1)

Definition at line 73 of file atmel-wm97xx.c.

Function Documentation

MODULE_AUTHOR ( "Hans-Christian Egtvedt <egtvedt@samfundet.no>"  )
MODULE_DESCRIPTION ( "wm97xx continuous touch driver for Atmel AT91 and AVR32"  )
module_exit ( atmel_wm97xx_exit  )
module_init ( atmel_wm97xx_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( cont_rate  ,
int  ,
 
)
module_param ( pen_int  ,
int  ,
 
)
module_param ( pressure  ,
int  ,
 
)
module_param ( ac97_touch_slot  ,
int  ,
 
)
module_param ( atmel_gpio_line  ,
int  ,
 
)
MODULE_PARM_DESC ( cont_rate  ,
"Sampling rate in continuous mode (Hz)"   
)
MODULE_PARM_DESC ( pen_int  ,
"Pen down detection (1 = interrupt, 0 = polling)"   
)
MODULE_PARM_DESC ( pressure  ,
"Pressure readback (1 = pressure, 0 = no pressure)"   
)
MODULE_PARM_DESC ( ac97_touch_slot  ,
"Touch screen data slot AC97 number  
)
MODULE_PARM_DESC ( atmel_gpio_line  ,
"GPIO line number connected to WM97xx"   
)