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 <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/i2c-omap.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <mach/irqs.h>
#include <plat/i2c.h>
#include <plat/omap-pm.h>
#include <plat/omap_device.h>

Go to the source code of this file.

Macros

#define OMAP_I2C_SIZE   0x3f
 
#define OMAP1_I2C_BASE   0xfffb3800
 
#define OMAP1_INT_I2C   (32 + 4)
 
#define I2C_RESOURCE_BUILDER(base, irq)
 
#define I2C_DEV_BUILDER(bus_id, res, data)
 
#define MAX_OMAP_I2C_HWMOD_NAME_LEN   16
 
#define OMAP_I2C_MAX_CONTROLLERS   4
 
#define OMAP_I2C_CMDLINE_SETUP   (BIT(31))
 

Functions

 __setup ("i2c_bus=", omap_i2c_bus_setup)
 
 subsys_initcall (omap_register_i2c_bus_cmdline)
 
int __init omap_register_i2c_bus (int bus_id, u32 clkrate, struct i2c_board_info const *info, unsigned len)
 

Macro Definition Documentation

#define I2C_DEV_BUILDER (   bus_id,
  res,
  data 
)
Value:
{ \
.id = (bus_id), \
.name = name, \
.resource = (res), \
.dev = { \
.platform_data = (data), \
}, \
}

Definition at line 60 of file i2c.c.

#define I2C_RESOURCE_BUILDER (   base,
  irq 
)
Value:
{ \
.start = (base), \
.end = (base) + OMAP_I2C_SIZE, \
.flags = IORESOURCE_MEM, \
}, \
{ \
.start = (irq), \
},

Definition at line 45 of file i2c.c.

#define MAX_OMAP_I2C_HWMOD_NAME_LEN   16

Definition at line 71 of file i2c.c.

#define OMAP1_I2C_BASE   0xfffb3800

Definition at line 40 of file i2c.c.

#define OMAP1_INT_I2C   (32 + 4)

Definition at line 41 of file i2c.c.

#define OMAP_I2C_CMDLINE_SETUP   (BIT(31))

Definition at line 78 of file i2c.c.

#define OMAP_I2C_MAX_CONTROLLERS   4

Definition at line 72 of file i2c.c.

#define OMAP_I2C_SIZE   0x3f

Definition at line 39 of file i2c.c.

Function Documentation

__setup ( )
int __init omap_register_i2c_bus ( int  bus_id,
u32  clkrate,
struct i2c_board_info const info,
unsigned  len 
)

omap_register_i2c_bus - register I2C bus with device descriptors : bus id counting from number 1 : clock rate of the bus in kHz : pointer into I2C device descriptor table or NULL : number of descriptors in the table

Returns 0 on success or an error code.

Definition at line 261 of file i2c.c.

subsys_initcall ( omap_register_i2c_bus_cmdline  )