Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
at32psif.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/serio.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  psif
 

Macros

#define PSIF_CR   0x00
 
#define PSIF_RHR   0x04
 
#define PSIF_THR   0x08
 
#define PSIF_SR   0x10
 
#define PSIF_IER   0x14
 
#define PSIF_IDR   0x18
 
#define PSIF_IMR   0x1c
 
#define PSIF_PSR   0x24
 
#define PSIF_CR_RXDIS_OFFSET   1
 
#define PSIF_CR_RXDIS_SIZE   1
 
#define PSIF_CR_RXEN_OFFSET   0
 
#define PSIF_CR_RXEN_SIZE   1
 
#define PSIF_CR_SWRST_OFFSET   15
 
#define PSIF_CR_SWRST_SIZE   1
 
#define PSIF_CR_TXDIS_OFFSET   9
 
#define PSIF_CR_TXDIS_SIZE   1
 
#define PSIF_CR_TXEN_OFFSET   8
 
#define PSIF_CR_TXEN_SIZE   1
 
#define PSIF_NACK_OFFSET   8
 
#define PSIF_NACK_SIZE   1
 
#define PSIF_OVRUN_OFFSET   5
 
#define PSIF_OVRUN_SIZE   1
 
#define PSIF_PARITY_OFFSET   9
 
#define PSIF_PARITY_SIZE   1
 
#define PSIF_RXRDY_OFFSET   4
 
#define PSIF_RXRDY_SIZE   1
 
#define PSIF_TXEMPTY_OFFSET   1
 
#define PSIF_TXEMPTY_SIZE   1
 
#define PSIF_TXRDY_OFFSET   0
 
#define PSIF_TXRDY_SIZE   1
 
#define PSIF_PSR_PRSCV_OFFSET   0
 
#define PSIF_PSR_PRSCV_SIZE   12
 
#define PSIF_RHR_RXDATA_OFFSET   0
 
#define PSIF_RHR_RXDATA_SIZE   8
 
#define PSIF_THR_TXDATA_OFFSET   0
 
#define PSIF_THR_TXDATA_SIZE   8
 
#define PSIF_BIT(name)   (1 << PSIF_##name##_OFFSET)
 
#define PSIF_BF(name, value)
 
#define PSIF_BFEXT(name, value)
 
#define PSIF_BFINS(name, value, old)
 
#define psif_readl(port, reg)   __raw_readl((port)->regs + PSIF_##reg)
 
#define psif_writel(port, reg, value)   __raw_writel((value), (port)->regs + PSIF_##reg)
 

Functions

 module_init (psif_init)
 
 module_exit (psif_exit)
 
 MODULE_AUTHOR ("Hans-Christian Egtvedt <egtvedt@samfundet.no>")
 
 MODULE_DESCRIPTION ("Atmel AVR32 PSIF PS/2 driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define PSIF_BF (   name,
  value 
)
Value:
(((value) & ((1 << PSIF_##name##_SIZE) - 1)) \
<< PSIF_##name##_OFFSET)

Definition at line 75 of file at32psif.c.

#define PSIF_BFEXT (   name,
  value 
)
Value:
(((value) >> PSIF_##name##_OFFSET) \
& ((1 << PSIF_##name##_SIZE) - 1))

Definition at line 79 of file at32psif.c.

#define PSIF_BFINS (   name,
  value,
  old 
)
Value:
(((old) & ~(((1 << PSIF_##name##_SIZE) - 1) \
<< PSIF_##name##_OFFSET)) \

Definition at line 83 of file at32psif.c.

#define PSIF_BIT (   name)    (1 << PSIF_##name##_OFFSET)

Definition at line 72 of file at32psif.c.

#define PSIF_CR   0x00

Definition at line 24 of file at32psif.c.

#define PSIF_CR_RXDIS_OFFSET   1

Definition at line 34 of file at32psif.c.

#define PSIF_CR_RXDIS_SIZE   1

Definition at line 35 of file at32psif.c.

#define PSIF_CR_RXEN_OFFSET   0

Definition at line 36 of file at32psif.c.

#define PSIF_CR_RXEN_SIZE   1

Definition at line 37 of file at32psif.c.

#define PSIF_CR_SWRST_OFFSET   15

Definition at line 38 of file at32psif.c.

#define PSIF_CR_SWRST_SIZE   1

Definition at line 39 of file at32psif.c.

#define PSIF_CR_TXDIS_OFFSET   9

Definition at line 40 of file at32psif.c.

#define PSIF_CR_TXDIS_SIZE   1

Definition at line 41 of file at32psif.c.

#define PSIF_CR_TXEN_OFFSET   8

Definition at line 42 of file at32psif.c.

#define PSIF_CR_TXEN_SIZE   1

Definition at line 43 of file at32psif.c.

#define PSIF_IDR   0x18

Definition at line 29 of file at32psif.c.

#define PSIF_IER   0x14

Definition at line 28 of file at32psif.c.

#define PSIF_IMR   0x1c

Definition at line 30 of file at32psif.c.

#define PSIF_NACK_OFFSET   8

Definition at line 46 of file at32psif.c.

#define PSIF_NACK_SIZE   1

Definition at line 47 of file at32psif.c.

#define PSIF_OVRUN_OFFSET   5

Definition at line 48 of file at32psif.c.

#define PSIF_OVRUN_SIZE   1

Definition at line 49 of file at32psif.c.

#define PSIF_PARITY_OFFSET   9

Definition at line 50 of file at32psif.c.

#define PSIF_PARITY_SIZE   1

Definition at line 51 of file at32psif.c.

#define PSIF_PSR   0x24

Definition at line 31 of file at32psif.c.

#define PSIF_PSR_PRSCV_OFFSET   0

Definition at line 60 of file at32psif.c.

#define PSIF_PSR_PRSCV_SIZE   12

Definition at line 61 of file at32psif.c.

#define psif_readl (   port,
  reg 
)    __raw_readl((port)->regs + PSIF_##reg)

Definition at line 89 of file at32psif.c.

#define PSIF_RHR   0x04

Definition at line 25 of file at32psif.c.

#define PSIF_RHR_RXDATA_OFFSET   0

Definition at line 64 of file at32psif.c.

#define PSIF_RHR_RXDATA_SIZE   8

Definition at line 65 of file at32psif.c.

#define PSIF_RXRDY_OFFSET   4

Definition at line 52 of file at32psif.c.

#define PSIF_RXRDY_SIZE   1

Definition at line 53 of file at32psif.c.

#define PSIF_SR   0x10

Definition at line 27 of file at32psif.c.

#define PSIF_THR   0x08

Definition at line 26 of file at32psif.c.

#define PSIF_THR_TXDATA_OFFSET   0

Definition at line 68 of file at32psif.c.

#define PSIF_THR_TXDATA_SIZE   8

Definition at line 69 of file at32psif.c.

#define PSIF_TXEMPTY_OFFSET   1

Definition at line 54 of file at32psif.c.

#define PSIF_TXEMPTY_SIZE   1

Definition at line 55 of file at32psif.c.

#define PSIF_TXRDY_OFFSET   0

Definition at line 56 of file at32psif.c.

#define PSIF_TXRDY_SIZE   1

Definition at line 57 of file at32psif.c.

#define psif_writel (   port,
  reg,
  value 
)    __raw_writel((value), (port)->regs + PSIF_##reg)

Definition at line 92 of file at32psif.c.

Function Documentation

MODULE_AUTHOR ( "Hans-Christian Egtvedt <egtvedt@samfundet.no>"  )
MODULE_DESCRIPTION ( "Atmel AVR32 PSIF PS/2 driver )
module_exit ( psif_exit  )
module_init ( psif_init  )
MODULE_LICENSE ( "GPL"  )