Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
i2c-davinci.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/cpufreq.h>
#include <linux/gpio.h>
#include <linux/of_i2c.h>
#include <linux/of_device.h>
#include <mach/hardware.h>
#include <linux/platform_data/i2c-davinci.h>

Go to the source code of this file.

Data Structures

struct  davinci_i2c_dev
 

Macros

#define DAVINCI_I2C_TIMEOUT   (1*HZ)
 
#define DAVINCI_I2C_MAX_TRIES   2
 
#define I2C_DAVINCI_INTR_ALL
 
#define DAVINCI_I2C_OAR_REG   0x00
 
#define DAVINCI_I2C_IMR_REG   0x04
 
#define DAVINCI_I2C_STR_REG   0x08
 
#define DAVINCI_I2C_CLKL_REG   0x0c
 
#define DAVINCI_I2C_CLKH_REG   0x10
 
#define DAVINCI_I2C_CNT_REG   0x14
 
#define DAVINCI_I2C_DRR_REG   0x18
 
#define DAVINCI_I2C_SAR_REG   0x1c
 
#define DAVINCI_I2C_DXR_REG   0x20
 
#define DAVINCI_I2C_MDR_REG   0x24
 
#define DAVINCI_I2C_IVR_REG   0x28
 
#define DAVINCI_I2C_EMDR_REG   0x2c
 
#define DAVINCI_I2C_PSC_REG   0x30
 
#define DAVINCI_I2C_IVR_AAS   0x07
 
#define DAVINCI_I2C_IVR_SCD   0x06
 
#define DAVINCI_I2C_IVR_XRDY   0x05
 
#define DAVINCI_I2C_IVR_RDR   0x04
 
#define DAVINCI_I2C_IVR_ARDY   0x03
 
#define DAVINCI_I2C_IVR_NACK   0x02
 
#define DAVINCI_I2C_IVR_AL   0x01
 
#define DAVINCI_I2C_STR_BB   BIT(12)
 
#define DAVINCI_I2C_STR_RSFULL   BIT(11)
 
#define DAVINCI_I2C_STR_SCD   BIT(5)
 
#define DAVINCI_I2C_STR_ARDY   BIT(2)
 
#define DAVINCI_I2C_STR_NACK   BIT(1)
 
#define DAVINCI_I2C_STR_AL   BIT(0)
 
#define DAVINCI_I2C_MDR_NACK   BIT(15)
 
#define DAVINCI_I2C_MDR_STT   BIT(13)
 
#define DAVINCI_I2C_MDR_STP   BIT(11)
 
#define DAVINCI_I2C_MDR_MST   BIT(10)
 
#define DAVINCI_I2C_MDR_TRX   BIT(9)
 
#define DAVINCI_I2C_MDR_XA   BIT(8)
 
#define DAVINCI_I2C_MDR_RM   BIT(7)
 
#define DAVINCI_I2C_MDR_IRS   BIT(5)
 
#define DAVINCI_I2C_IMR_AAS   BIT(6)
 
#define DAVINCI_I2C_IMR_SCD   BIT(5)
 
#define DAVINCI_I2C_IMR_XRDY   BIT(4)
 
#define DAVINCI_I2C_IMR_RRDY   BIT(3)
 
#define DAVINCI_I2C_IMR_ARDY   BIT(2)
 
#define DAVINCI_I2C_IMR_NACK   BIT(1)
 
#define DAVINCI_I2C_IMR_AL   BIT(0)
 
#define davinci_i2c_pm_ops   NULL
 

Functions

 MODULE_DEVICE_TABLE (of, davinci_i2c_of_match)
 
 MODULE_ALIAS ("platform:i2c_davinci")
 
 subsys_initcall (davinci_i2c_init_driver)
 
 module_exit (davinci_i2c_exit_driver)
 
 MODULE_AUTHOR ("Texas Instruments India")
 
 MODULE_DESCRIPTION ("TI DaVinci I2C bus adapter")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DAVINCI_I2C_CLKH_REG   0x10

Definition at line 61 of file i2c-davinci.c.

#define DAVINCI_I2C_CLKL_REG   0x0c

Definition at line 60 of file i2c-davinci.c.

#define DAVINCI_I2C_CNT_REG   0x14

Definition at line 62 of file i2c-davinci.c.

#define DAVINCI_I2C_DRR_REG   0x18

Definition at line 63 of file i2c-davinci.c.

#define DAVINCI_I2C_DXR_REG   0x20

Definition at line 65 of file i2c-davinci.c.

#define DAVINCI_I2C_EMDR_REG   0x2c

Definition at line 68 of file i2c-davinci.c.

#define DAVINCI_I2C_IMR_AAS   BIT(6)

Definition at line 95 of file i2c-davinci.c.

#define DAVINCI_I2C_IMR_AL   BIT(0)

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

#define DAVINCI_I2C_IMR_ARDY   BIT(2)

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

#define DAVINCI_I2C_IMR_NACK   BIT(1)

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

#define DAVINCI_I2C_IMR_REG   0x04

Definition at line 58 of file i2c-davinci.c.

#define DAVINCI_I2C_IMR_RRDY   BIT(3)

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

#define DAVINCI_I2C_IMR_SCD   BIT(5)

Definition at line 96 of file i2c-davinci.c.

#define DAVINCI_I2C_IMR_XRDY   BIT(4)

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

#define DAVINCI_I2C_IVR_AAS   0x07

Definition at line 71 of file i2c-davinci.c.

#define DAVINCI_I2C_IVR_AL   0x01

Definition at line 77 of file i2c-davinci.c.

#define DAVINCI_I2C_IVR_ARDY   0x03

Definition at line 75 of file i2c-davinci.c.

#define DAVINCI_I2C_IVR_NACK   0x02

Definition at line 76 of file i2c-davinci.c.

#define DAVINCI_I2C_IVR_RDR   0x04

Definition at line 74 of file i2c-davinci.c.

#define DAVINCI_I2C_IVR_REG   0x28

Definition at line 67 of file i2c-davinci.c.

#define DAVINCI_I2C_IVR_SCD   0x06

Definition at line 72 of file i2c-davinci.c.

#define DAVINCI_I2C_IVR_XRDY   0x05

Definition at line 73 of file i2c-davinci.c.

#define DAVINCI_I2C_MAX_TRIES   2

Definition at line 50 of file i2c-davinci.c.

#define DAVINCI_I2C_MDR_IRS   BIT(5)

Definition at line 93 of file i2c-davinci.c.

#define DAVINCI_I2C_MDR_MST   BIT(10)

Definition at line 89 of file i2c-davinci.c.

#define DAVINCI_I2C_MDR_NACK   BIT(15)

Definition at line 86 of file i2c-davinci.c.

#define DAVINCI_I2C_MDR_REG   0x24

Definition at line 66 of file i2c-davinci.c.

#define DAVINCI_I2C_MDR_RM   BIT(7)

Definition at line 92 of file i2c-davinci.c.

#define DAVINCI_I2C_MDR_STP   BIT(11)

Definition at line 88 of file i2c-davinci.c.

#define DAVINCI_I2C_MDR_STT   BIT(13)

Definition at line 87 of file i2c-davinci.c.

#define DAVINCI_I2C_MDR_TRX   BIT(9)

Definition at line 90 of file i2c-davinci.c.

#define DAVINCI_I2C_MDR_XA   BIT(8)

Definition at line 91 of file i2c-davinci.c.

#define DAVINCI_I2C_OAR_REG   0x00

Definition at line 57 of file i2c-davinci.c.

#define davinci_i2c_pm_ops   NULL

Definition at line 824 of file i2c-davinci.c.

#define DAVINCI_I2C_PSC_REG   0x30

Definition at line 69 of file i2c-davinci.c.

#define DAVINCI_I2C_SAR_REG   0x1c

Definition at line 64 of file i2c-davinci.c.

#define DAVINCI_I2C_STR_AL   BIT(0)

Definition at line 84 of file i2c-davinci.c.

#define DAVINCI_I2C_STR_ARDY   BIT(2)

Definition at line 82 of file i2c-davinci.c.

#define DAVINCI_I2C_STR_BB   BIT(12)

Definition at line 79 of file i2c-davinci.c.

#define DAVINCI_I2C_STR_NACK   BIT(1)

Definition at line 83 of file i2c-davinci.c.

#define DAVINCI_I2C_STR_REG   0x08

Definition at line 59 of file i2c-davinci.c.

#define DAVINCI_I2C_STR_RSFULL   BIT(11)

Definition at line 80 of file i2c-davinci.c.

#define DAVINCI_I2C_STR_SCD   BIT(5)

Definition at line 81 of file i2c-davinci.c.

#define DAVINCI_I2C_TIMEOUT   (1*HZ)

Definition at line 49 of file i2c-davinci.c.

#define I2C_DAVINCI_INTR_ALL
Value:
DAVINCI_I2C_IMR_SCD | \
DAVINCI_I2C_IMR_ARDY | \
DAVINCI_I2C_IMR_NACK | \
DAVINCI_I2C_IMR_AL)

Definition at line 51 of file i2c-davinci.c.

Function Documentation

MODULE_ALIAS ( "platform:i2c_davinci"  )
MODULE_AUTHOR ( "Texas Instruments India"  )
MODULE_DESCRIPTION ( "TI DaVinci I2C bus adapter )
MODULE_DEVICE_TABLE ( of  ,
davinci_i2c_of_match   
)
module_exit ( davinci_i2c_exit_driver  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( davinci_i2c_init_driver  )