Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
i2c-highlander.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/completion.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  highlander_i2c_dev
 

Macros

#define SMCR   0x00
 
#define SMCR_START   (1 << 0)
 
#define SMCR_IRIC   (1 << 1)
 
#define SMCR_BBSY   (1 << 2)
 
#define SMCR_ACKE   (1 << 3)
 
#define SMCR_RST   (1 << 4)
 
#define SMCR_IEIC   (1 << 6)
 
#define SMSMADR   0x02
 
#define SMMR   0x04
 
#define SMMR_MODE0   (1 << 0)
 
#define SMMR_MODE1   (1 << 1)
 
#define SMMR_CAP   (1 << 3)
 
#define SMMR_TMMD   (1 << 4)
 
#define SMMR_SP   (1 << 7)
 
#define SMSADR   0x06
 
#define SMTRDR   0x46
 

Functions

 module_platform_driver (highlander_i2c_driver)
 
 MODULE_AUTHOR ("Paul Mundt")
 
 MODULE_DESCRIPTION ("Renesas Highlander FPGA I2C/SMBus adapter")
 
 MODULE_LICENSE ("GPL v2")
 
 module_param (iic_force_poll, bool, 0)
 
 module_param (iic_force_normal, bool, 0)
 
 module_param (iic_timeout, int, 0)
 
 module_param (iic_read_delay, int, 0)
 
 MODULE_PARM_DESC (iic_force_poll,"Force polling mode")
 
 MODULE_PARM_DESC (iic_force_normal,"Force normal mode (100 kHz), default is fast mode (400 kHz)")
 
 MODULE_PARM_DESC (iic_timeout,"Set timeout value in msecs (default 1000 ms)")
 
 MODULE_PARM_DESC (iic_read_delay,"Delay between data read cycles (default 0 ms)")
 

Macro Definition Documentation

#define SMCR   0x00

Definition at line 24 of file i2c-highlander.c.

#define SMCR_ACKE   (1 << 3)

Definition at line 28 of file i2c-highlander.c.

#define SMCR_BBSY   (1 << 2)

Definition at line 27 of file i2c-highlander.c.

#define SMCR_IEIC   (1 << 6)

Definition at line 30 of file i2c-highlander.c.

#define SMCR_IRIC   (1 << 1)

Definition at line 26 of file i2c-highlander.c.

#define SMCR_RST   (1 << 4)

Definition at line 29 of file i2c-highlander.c.

#define SMCR_START   (1 << 0)

Definition at line 25 of file i2c-highlander.c.

#define SMMR   0x04

Definition at line 34 of file i2c-highlander.c.

#define SMMR_CAP   (1 << 3)

Definition at line 37 of file i2c-highlander.c.

#define SMMR_MODE0   (1 << 0)

Definition at line 35 of file i2c-highlander.c.

#define SMMR_MODE1   (1 << 1)

Definition at line 36 of file i2c-highlander.c.

#define SMMR_SP   (1 << 7)

Definition at line 39 of file i2c-highlander.c.

#define SMMR_TMMD   (1 << 4)

Definition at line 38 of file i2c-highlander.c.

#define SMSADR   0x06

Definition at line 41 of file i2c-highlander.c.

#define SMSMADR   0x02

Definition at line 32 of file i2c-highlander.c.

#define SMTRDR   0x46

Definition at line 42 of file i2c-highlander.c.

Function Documentation

MODULE_AUTHOR ( "Paul Mundt"  )
MODULE_DESCRIPTION ( "Renesas Highlander FPGA I2C/SMBus adapter )
MODULE_LICENSE ( "GPL v2 )
module_param ( iic_force_poll  ,
bool  ,
 
)
module_param ( iic_force_normal  ,
bool  ,
 
)
module_param ( iic_timeout  ,
int  ,
 
)
module_param ( iic_read_delay  ,
int  ,
 
)
MODULE_PARM_DESC ( iic_force_poll  ,
"Force polling mode  
)
MODULE_PARM_DESC ( iic_force_normal  ,
"Force normal mode   100 kHz,
default is fast mode(400 kHz)"   
)
MODULE_PARM_DESC ( iic_timeout  ,
"Set timeout value in msecs (default 1000 ms)"   
)
MODULE_PARM_DESC ( iic_read_delay  ,
"Delay between data read cycles (default 0 ms)"   
)
module_platform_driver ( highlander_i2c_driver  )