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

Go to the source code of this file.

Data Structures

struct  imx_i2c_struct
 

Macros

#define DRIVER_NAME   "imx-i2c"
 
#define IMX_I2C_BIT_RATE   100000 /* 100kHz */
 
#define IMX_I2C_IADR   0x00 /* i2c slave address */
 
#define IMX_I2C_IFDR   0x04 /* i2c frequency divider */
 
#define IMX_I2C_I2CR   0x08 /* i2c control */
 
#define IMX_I2C_I2SR   0x0C /* i2c status */
 
#define IMX_I2C_I2DR   0x10 /* i2c transfer data */
 
#define I2SR_RXAK   0x01
 
#define I2SR_IIF   0x02
 
#define I2SR_SRW   0x04
 
#define I2SR_IAL   0x10
 
#define I2SR_IBB   0x20
 
#define I2SR_IAAS   0x40
 
#define I2SR_ICF   0x80
 
#define I2CR_RSTA   0x04
 
#define I2CR_TXAK   0x08
 
#define I2CR_MTX   0x10
 
#define I2CR_MSTA   0x20
 
#define I2CR_IIEN   0x40
 
#define I2CR_IEN   0x80
 

Functions

 subsys_initcall (i2c_adap_imx_init)
 
 module_exit (i2c_adap_imx_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Darius Augulis")
 
 MODULE_DESCRIPTION ("I2C adapter driver for IMX I2C bus")
 
 MODULE_ALIAS ("platform:"DRIVER_NAME)
 

Macro Definition Documentation

#define DRIVER_NAME   "imx-i2c"

Includes *******************************************************************Defines ********************************************************************

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

#define I2CR_IEN   0x80

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

#define I2CR_IIEN   0x40

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

#define I2CR_MSTA   0x20

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

#define I2CR_MTX   0x10

Definition at line 85 of file i2c-imx.c.

#define I2CR_RSTA   0x04

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

#define I2CR_TXAK   0x08

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

#define I2SR_IAAS   0x40

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

#define I2SR_IAL   0x10

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

#define I2SR_IBB   0x20

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

#define I2SR_ICF   0x80

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

#define I2SR_IIF   0x02

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

#define I2SR_RXAK   0x01

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

#define I2SR_SRW   0x04

Definition at line 78 of file i2c-imx.c.

#define IMX_I2C_BIT_RATE   100000 /* 100kHz */

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

#define IMX_I2C_I2CR   0x08 /* i2c control */

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

#define IMX_I2C_I2DR   0x10 /* i2c transfer data */

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

#define IMX_I2C_I2SR   0x0C /* i2c status */

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

#define IMX_I2C_IADR   0x00 /* i2c slave address */

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

#define IMX_I2C_IFDR   0x04 /* i2c frequency divider */

Definition at line 70 of file i2c-imx.c.

Function Documentation

MODULE_ALIAS ( "platform:"  DRIVER_NAME)
MODULE_AUTHOR ( "Darius Augulis"  )
MODULE_DESCRIPTION ( "I2C adapter driver for IMX I2C bus )
module_exit ( i2c_adap_imx_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( i2c_adap_imx_init  )