Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
lpc32xx_ts.c File Reference
#include <linux/platform_device.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/of.h>

Go to the source code of this file.

Data Structures

struct  lpc32xx_tsc
 

Macros

#define LPC32XX_TSC_STAT   0x00
 
#define LPC32XX_TSC_SEL   0x04
 
#define LPC32XX_TSC_CON   0x08
 
#define LPC32XX_TSC_FIFO   0x0C
 
#define LPC32XX_TSC_DTR   0x10
 
#define LPC32XX_TSC_RTR   0x14
 
#define LPC32XX_TSC_UTR   0x18
 
#define LPC32XX_TSC_TTR   0x1C
 
#define LPC32XX_TSC_DXP   0x20
 
#define LPC32XX_TSC_MIN_X   0x24
 
#define LPC32XX_TSC_MAX_X   0x28
 
#define LPC32XX_TSC_MIN_Y   0x2C
 
#define LPC32XX_TSC_MAX_Y   0x30
 
#define LPC32XX_TSC_AUX_UTR   0x34
 
#define LPC32XX_TSC_AUX_MIN   0x38
 
#define LPC32XX_TSC_AUX_MAX   0x3C
 
#define LPC32XX_TSC_STAT_FIFO_OVRRN   (1 << 8)
 
#define LPC32XX_TSC_STAT_FIFO_EMPTY   (1 << 7)
 
#define LPC32XX_TSC_SEL_DEFVAL   0x0284
 
#define LPC32XX_TSC_ADCCON_IRQ_TO_FIFO_4   (0x1 << 11)
 
#define LPC32XX_TSC_ADCCON_X_SAMPLE_SIZE(s)   ((10 - (s)) << 7)
 
#define LPC32XX_TSC_ADCCON_Y_SAMPLE_SIZE(s)   ((10 - (s)) << 4)
 
#define LPC32XX_TSC_ADCCON_POWER_UP   (1 << 2)
 
#define LPC32XX_TSC_ADCCON_AUTO_EN   (1 << 0)
 
#define LPC32XX_TSC_FIFO_TS_P_LEVEL   (1 << 31)
 
#define LPC32XX_TSC_FIFO_NORMALIZE_X_VAL(x)   (((x) & 0x03FF0000) >> 16)
 
#define LPC32XX_TSC_FIFO_NORMALIZE_Y_VAL(y)   ((y) & 0x000003FF)
 
#define LPC32XX_TSC_ADCDAT_VALUE_MASK   0x000003FF
 
#define LPC32XX_TSC_MIN_XY_VAL   0x0
 
#define LPC32XX_TSC_MAX_XY_VAL   0x3FF
 
#define MOD_NAME   "ts-lpc32xx"
 
#define tsc_readl(dev, reg)   __raw_readl((dev)->tsc_base + (reg))
 
#define tsc_writel(dev, reg, val)   __raw_writel((val), (dev)->tsc_base + (reg))
 
#define LPC32XX_TS_PM_OPS   NULL
 

Functions

 module_platform_driver (lpc32xx_ts_driver)
 
 MODULE_AUTHOR ("Kevin Wells <[email protected]")
 
 MODULE_DESCRIPTION ("LPC32XX TSC Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:lpc32xx_ts")
 

Macro Definition Documentation

#define LPC32XX_TS_PM_OPS   NULL

Definition at line 384 of file lpc32xx_ts.c.

#define LPC32XX_TSC_ADCCON_AUTO_EN   (1 << 0)

Definition at line 56 of file lpc32xx_ts.c.

#define LPC32XX_TSC_ADCCON_IRQ_TO_FIFO_4   (0x1 << 11)

Definition at line 52 of file lpc32xx_ts.c.

#define LPC32XX_TSC_ADCCON_POWER_UP   (1 << 2)

Definition at line 55 of file lpc32xx_ts.c.

#define LPC32XX_TSC_ADCCON_X_SAMPLE_SIZE (   s)    ((10 - (s)) << 7)

Definition at line 53 of file lpc32xx_ts.c.

#define LPC32XX_TSC_ADCCON_Y_SAMPLE_SIZE (   s)    ((10 - (s)) << 4)

Definition at line 54 of file lpc32xx_ts.c.

#define LPC32XX_TSC_ADCDAT_VALUE_MASK   0x000003FF

Definition at line 62 of file lpc32xx_ts.c.

#define LPC32XX_TSC_AUX_MAX   0x3C

Definition at line 45 of file lpc32xx_ts.c.

#define LPC32XX_TSC_AUX_MIN   0x38

Definition at line 44 of file lpc32xx_ts.c.

#define LPC32XX_TSC_AUX_UTR   0x34

Definition at line 43 of file lpc32xx_ts.c.

#define LPC32XX_TSC_CON   0x08

Definition at line 32 of file lpc32xx_ts.c.

#define LPC32XX_TSC_DTR   0x10

Definition at line 34 of file lpc32xx_ts.c.

#define LPC32XX_TSC_DXP   0x20

Definition at line 38 of file lpc32xx_ts.c.

#define LPC32XX_TSC_FIFO   0x0C

Definition at line 33 of file lpc32xx_ts.c.

#define LPC32XX_TSC_FIFO_NORMALIZE_X_VAL (   x)    (((x) & 0x03FF0000) >> 16)

Definition at line 59 of file lpc32xx_ts.c.

#define LPC32XX_TSC_FIFO_NORMALIZE_Y_VAL (   y)    ((y) & 0x000003FF)

Definition at line 60 of file lpc32xx_ts.c.

#define LPC32XX_TSC_FIFO_TS_P_LEVEL   (1 << 31)

Definition at line 58 of file lpc32xx_ts.c.

#define LPC32XX_TSC_MAX_X   0x28

Definition at line 40 of file lpc32xx_ts.c.

#define LPC32XX_TSC_MAX_XY_VAL   0x3FF

Definition at line 65 of file lpc32xx_ts.c.

#define LPC32XX_TSC_MAX_Y   0x30

Definition at line 42 of file lpc32xx_ts.c.

#define LPC32XX_TSC_MIN_X   0x24

Definition at line 39 of file lpc32xx_ts.c.

#define LPC32XX_TSC_MIN_XY_VAL   0x0

Definition at line 64 of file lpc32xx_ts.c.

#define LPC32XX_TSC_MIN_Y   0x2C

Definition at line 41 of file lpc32xx_ts.c.

#define LPC32XX_TSC_RTR   0x14

Definition at line 35 of file lpc32xx_ts.c.

#define LPC32XX_TSC_SEL   0x04

Definition at line 31 of file lpc32xx_ts.c.

#define LPC32XX_TSC_SEL_DEFVAL   0x0284

Definition at line 50 of file lpc32xx_ts.c.

#define LPC32XX_TSC_STAT   0x00

Definition at line 30 of file lpc32xx_ts.c.

#define LPC32XX_TSC_STAT_FIFO_EMPTY   (1 << 7)

Definition at line 48 of file lpc32xx_ts.c.

#define LPC32XX_TSC_STAT_FIFO_OVRRN   (1 << 8)

Definition at line 47 of file lpc32xx_ts.c.

#define LPC32XX_TSC_TTR   0x1C

Definition at line 37 of file lpc32xx_ts.c.

#define LPC32XX_TSC_UTR   0x18

Definition at line 36 of file lpc32xx_ts.c.

#define MOD_NAME   "ts-lpc32xx"

Definition at line 67 of file lpc32xx_ts.c.

#define tsc_readl (   dev,
  reg 
)    __raw_readl((dev)->tsc_base + (reg))

Definition at line 69 of file lpc32xx_ts.c.

#define tsc_writel (   dev,
  reg,
  val 
)    __raw_writel((val), (dev)->tsc_base + (reg))

Definition at line 71 of file lpc32xx_ts.c.

Function Documentation

MODULE_ALIAS ( "platform:lpc32xx_ts"  )
MODULE_AUTHOR ( )
MODULE_DESCRIPTION ( "LPC32XX TSC Driver"  )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( lpc32xx_ts_driver  )