Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
i2c.c File Reference
#include <plat/i2c.h>
#include "common.h"
#include <plat/omap_hwmod.h>
#include "mux.h"

Go to the source code of this file.

Macros

#define I2C_EN   BIT(15)
 
#define OMAP2_I2C_CON_OFFSET   0x24
 
#define OMAP4_I2C_CON_OFFSET   0xA4
 
#define MAX_MODULE_SOFTRESET_WAIT   10000
 

Functions

void __init omap2_i2c_mux_pins (int bus_id)
 
int omap_i2c_reset (struct omap_hwmod *oh)
 

Macro Definition Documentation

#define I2C_EN   BIT(15)

Definition at line 29 of file i2c.c.

#define MAX_MODULE_SOFTRESET_WAIT   10000

Definition at line 34 of file i2c.c.

#define OMAP2_I2C_CON_OFFSET   0x24

Definition at line 30 of file i2c.c.

#define OMAP4_I2C_CON_OFFSET   0xA4

Definition at line 31 of file i2c.c.

Function Documentation

void __init omap2_i2c_mux_pins ( int  bus_id)

Definition at line 36 of file i2c.c.

int omap_i2c_reset ( struct omap_hwmod oh)

omap_i2c_reset - reset the omap i2c module. : struct omap_hwmod *

The i2c moudle in omap2, omap3 had a special sequence to reset. The sequence is:

  • Disable the I2C.
  • Write to SOFTRESET bit.
  • Enable the I2C.
  • Poll on the RESETDONE bit. The sequence is implemented in below function. This is called for 2420, 2430 and omap3.

Definition at line 63 of file i2c.c.