Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
i2c-pxa.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/time.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/i2c-pxa.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_i2c.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/i2c/pxa-i2c.h>
#include <asm/irq.h>

Go to the source code of this file.

Data Structures

struct  pxa_reg_layout
 
struct  pxa_i2c
 

Macros

#define ICR_START   (1 << 0) /* start bit */
 
#define ICR_STOP   (1 << 1) /* stop bit */
 
#define ICR_ACKNAK   (1 << 2) /* send ACK(0) or NAK(1) */
 
#define ICR_TB   (1 << 3) /* transfer byte bit */
 
#define ICR_MA   (1 << 4) /* master abort */
 
#define ICR_SCLE   (1 << 5) /* master clock enable */
 
#define ICR_IUE   (1 << 6) /* unit enable */
 
#define ICR_GCD   (1 << 7) /* general call disable */
 
#define ICR_ITEIE   (1 << 8) /* enable tx interrupts */
 
#define ICR_IRFIE   (1 << 9) /* enable rx interrupts */
 
#define ICR_BEIE   (1 << 10) /* enable bus error ints */
 
#define ICR_SSDIE   (1 << 11) /* slave STOP detected int enable */
 
#define ICR_ALDIE   (1 << 12) /* enable arbitration interrupt */
 
#define ICR_SADIE   (1 << 13) /* slave address detected int enable */
 
#define ICR_UR   (1 << 14) /* unit reset */
 
#define ICR_FM   (1 << 15) /* fast mode */
 
#define ISR_RWM   (1 << 0) /* read/write mode */
 
#define ISR_ACKNAK   (1 << 1) /* ack/nak status */
 
#define ISR_UB   (1 << 2) /* unit busy */
 
#define ISR_IBB   (1 << 3) /* bus busy */
 
#define ISR_SSD   (1 << 4) /* slave stop detected */
 
#define ISR_ALD   (1 << 5) /* arbitration loss detected */
 
#define ISR_ITE   (1 << 6) /* tx buffer empty */
 
#define ISR_IRF   (1 << 7) /* rx buffer full */
 
#define ISR_GCAD   (1 << 8) /* general call address detected */
 
#define ISR_SAD   (1 << 9) /* slave address detected */
 
#define ISR_BED   (1 << 10) /* bus error no ACK/NAK */
 
#define _IBMR(i2c)   ((i2c)->reg_ibmr)
 
#define _IDBR(i2c)   ((i2c)->reg_idbr)
 
#define _ICR(i2c)   ((i2c)->reg_icr)
 
#define _ISR(i2c)   ((i2c)->reg_isr)
 
#define _ISAR(i2c)   ((i2c)->reg_isar)
 
#define I2C_PXA_SLAVE_ADDR   0x1
 
#define i2c_debug   0
 
#define show_state(i2c)   do { } while (0)
 
#define decode_ISR(val)   do { } while (0)
 
#define decode_ICR(val)   do { } while (0)
 
#define i2c_pxa_scream_blue_murder(i2c, why)   do { } while (0)
 
#define i2c_pxa_set_slave(i2c, err)   do { } while (0)
 
#define VALID_INT_SOURCE
 
#define I2C_PXA_DEV_PM_OPS   NULL
 

Enumerations

enum  pxa_i2c_types { REGS_PXA2XX, REGS_PXA3XX, REGS_CE4100 }
 

Functions

 MODULE_DEVICE_TABLE (platform, i2c_pxa_id_table)
 
 MODULE_DEVICE_TABLE (of, i2c_pxa_dt_ids)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:pxa2xx-i2c")
 
 subsys_initcall (i2c_adap_pxa_init)
 
 module_exit (i2c_adap_pxa_exit)
 

Macro Definition Documentation

#define _IBMR (   i2c)    ((i2c)->reg_ibmr)

Definition at line 160 of file i2c-pxa.c.

#define _ICR (   i2c)    ((i2c)->reg_icr)

Definition at line 162 of file i2c-pxa.c.

#define _IDBR (   i2c)    ((i2c)->reg_idbr)

Definition at line 161 of file i2c-pxa.c.

#define _ISAR (   i2c)    ((i2c)->reg_isar)

Definition at line 164 of file i2c-pxa.c.

#define _ISR (   i2c)    ((i2c)->reg_isr)

Definition at line 163 of file i2c-pxa.c.

#define decode_ICR (   val)    do { } while (0)

Definition at line 268 of file i2c-pxa.c.

#define decode_ISR (   val)    do { } while (0)

Definition at line 267 of file i2c-pxa.c.

#define i2c_debug   0

Definition at line 264 of file i2c-pxa.c.

#define I2C_PXA_DEV_PM_OPS   NULL

Definition at line 1267 of file i2c-pxa.c.

#define i2c_pxa_scream_blue_murder (   i2c,
  why 
)    do { } while (0)

Definition at line 269 of file i2c-pxa.c.

#define i2c_pxa_set_slave (   i2c,
  err 
)    do { } while (0)

Definition at line 442 of file i2c-pxa.c.

#define I2C_PXA_SLAVE_ADDR   0x1

Definition at line 169 of file i2c-pxa.c.

#define ICR_ACKNAK   (1 << 2) /* send ACK(0) or NAK(1) */

Definition at line 99 of file i2c-pxa.c.

#define ICR_ALDIE   (1 << 12) /* enable arbitration interrupt */

Definition at line 109 of file i2c-pxa.c.

#define ICR_BEIE   (1 << 10) /* enable bus error ints */

Definition at line 107 of file i2c-pxa.c.

#define ICR_FM   (1 << 15) /* fast mode */

Definition at line 112 of file i2c-pxa.c.

#define ICR_GCD   (1 << 7) /* general call disable */

Definition at line 104 of file i2c-pxa.c.

#define ICR_IRFIE   (1 << 9) /* enable rx interrupts */

Definition at line 106 of file i2c-pxa.c.

#define ICR_ITEIE   (1 << 8) /* enable tx interrupts */

Definition at line 105 of file i2c-pxa.c.

#define ICR_IUE   (1 << 6) /* unit enable */

Definition at line 103 of file i2c-pxa.c.

#define ICR_MA   (1 << 4) /* master abort */

Definition at line 101 of file i2c-pxa.c.

#define ICR_SADIE   (1 << 13) /* slave address detected int enable */

Definition at line 110 of file i2c-pxa.c.

#define ICR_SCLE   (1 << 5) /* master clock enable */

Definition at line 102 of file i2c-pxa.c.

#define ICR_SSDIE   (1 << 11) /* slave STOP detected int enable */

Definition at line 108 of file i2c-pxa.c.

#define ICR_START   (1 << 0) /* start bit */

Definition at line 97 of file i2c-pxa.c.

#define ICR_STOP   (1 << 1) /* stop bit */

Definition at line 98 of file i2c-pxa.c.

#define ICR_TB   (1 << 3) /* transfer byte bit */

Definition at line 100 of file i2c-pxa.c.

#define ICR_UR   (1 << 14) /* unit reset */

Definition at line 111 of file i2c-pxa.c.

#define ISR_ACKNAK   (1 << 1) /* ack/nak status */

Definition at line 115 of file i2c-pxa.c.

#define ISR_ALD   (1 << 5) /* arbitration loss detected */

Definition at line 119 of file i2c-pxa.c.

#define ISR_BED   (1 << 10) /* bus error no ACK/NAK */

Definition at line 124 of file i2c-pxa.c.

#define ISR_GCAD   (1 << 8) /* general call address detected */

Definition at line 122 of file i2c-pxa.c.

#define ISR_IBB   (1 << 3) /* bus busy */

Definition at line 117 of file i2c-pxa.c.

#define ISR_IRF   (1 << 7) /* rx buffer full */

Definition at line 121 of file i2c-pxa.c.

#define ISR_ITE   (1 << 6) /* tx buffer empty */

Definition at line 120 of file i2c-pxa.c.

#define ISR_RWM   (1 << 0) /* read/write mode */

Definition at line 114 of file i2c-pxa.c.

#define ISR_SAD   (1 << 9) /* slave address detected */

Definition at line 123 of file i2c-pxa.c.

#define ISR_SSD   (1 << 4) /* slave stop detected */

Definition at line 118 of file i2c-pxa.c.

#define ISR_UB   (1 << 2) /* unit busy */

Definition at line 116 of file i2c-pxa.c.

#define show_state (   i2c)    do { } while (0)

Definition at line 266 of file i2c-pxa.c.

#define VALID_INT_SOURCE
Value:
ISR_SAD | ISR_BED)

Definition at line 957 of file i2c-pxa.c.

Enumeration Type Documentation

Enumerator:
REGS_PXA2XX 
REGS_PXA3XX 
REGS_CE4100 

Definition at line 52 of file i2c-pxa.c.

Function Documentation

MODULE_ALIAS ( "platform:pxa2xx-i2c"  )
MODULE_DEVICE_TABLE ( platform  ,
i2c_pxa_id_table   
)
MODULE_DEVICE_TABLE ( of  ,
i2c_pxa_dt_ids   
)
module_exit ( i2c_adap_pxa_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( i2c_adap_pxa_init  )