#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/mv643xx_i2c.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_i2c.h>
#include <linux/clk.h>
#include <linux/err.h>
Go to the source code of this file.
|
enum | {
MV64XXX_I2C_STATE_INVALID,
MV64XXX_I2C_STATE_IDLE,
MV64XXX_I2C_STATE_WAITING_FOR_START_COND,
MV64XXX_I2C_STATE_WAITING_FOR_RESTART,
MV64XXX_I2C_STATE_WAITING_FOR_ADDR_1_ACK,
MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK,
MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK,
MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA
} |
|
enum | {
MV64XXX_I2C_ACTION_INVALID,
MV64XXX_I2C_ACTION_CONTINUE,
MV64XXX_I2C_ACTION_SEND_START,
MV64XXX_I2C_ACTION_SEND_RESTART,
MV64XXX_I2C_ACTION_SEND_ADDR_1,
MV64XXX_I2C_ACTION_SEND_ADDR_2,
MV64XXX_I2C_ACTION_SEND_DATA,
MV64XXX_I2C_ACTION_RCV_DATA,
MV64XXX_I2C_ACTION_RCV_DATA_STOP,
MV64XXX_I2C_ACTION_SEND_STOP
} |
|
#define MV64XXX_I2C_REG_BAUD 0x0c |
#define MV64XXX_I2C_REG_CONTROL 0x08 |
#define MV64XXX_I2C_REG_CONTROL_ACK 0x00000004 |
#define MV64XXX_I2C_REG_CONTROL_IFLG 0x00000008 |
#define MV64XXX_I2C_REG_CONTROL_INTEN 0x00000080 |
#define MV64XXX_I2C_REG_CONTROL_START 0x00000020 |
#define MV64XXX_I2C_REG_CONTROL_STOP 0x00000010 |
#define MV64XXX_I2C_REG_CONTROL_TWSIEN 0x00000040 |
#define MV64XXX_I2C_REG_DATA 0x04 |
#define MV64XXX_I2C_REG_EXT_SLAVE_ADDR 0x10 |
#define MV64XXX_I2C_REG_SLAVE_ADDR 0x00 |
#define MV64XXX_I2C_REG_SOFT_RESET 0x1c |
#define MV64XXX_I2C_REG_STATUS 0x0c |
#define MV64XXX_I2C_STATUS_BUS_ERR 0x00 |
#define MV64XXX_I2C_STATUS_MAST_LOST_ARB 0x38 |
#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_2_ACK 0xe0 |
#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_2_NO_ACK 0xe8 |
#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_ACK 0x40 |
#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_NO_ACK 0x48 |
#define MV64XXX_I2C_STATUS_MAST_RD_DATA_ACK 0x50 |
#define MV64XXX_I2C_STATUS_MAST_RD_DATA_NO_ACK 0x58 |
#define MV64XXX_I2C_STATUS_MAST_REPEAT_START 0x10 |
#define MV64XXX_I2C_STATUS_MAST_START 0x08 |
#define MV64XXX_I2C_STATUS_MAST_WR_ACK 0x28 |
#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_2_ACK 0xd0 |
#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_2_NO_ACK 0xd8 |
#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_ACK 0x18 |
#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_NO_ACK 0x20 |
#define MV64XXX_I2C_STATUS_MAST_WR_NO_ACK 0x30 |
#define MV64XXX_I2C_STATUS_NO_STATUS 0xf8 |
- Enumerator:
MV64XXX_I2C_STATE_INVALID |
|
MV64XXX_I2C_STATE_IDLE |
|
MV64XXX_I2C_STATE_WAITING_FOR_START_COND |
|
MV64XXX_I2C_STATE_WAITING_FOR_RESTART |
|
MV64XXX_I2C_STATE_WAITING_FOR_ADDR_1_ACK |
|
MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK |
|
MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK |
|
MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA |
|
Definition at line 63 of file i2c-mv64xxx.c.
- Enumerator:
MV64XXX_I2C_ACTION_INVALID |
|
MV64XXX_I2C_ACTION_CONTINUE |
|
MV64XXX_I2C_ACTION_SEND_START |
|
MV64XXX_I2C_ACTION_SEND_RESTART |
|
MV64XXX_I2C_ACTION_SEND_ADDR_1 |
|
MV64XXX_I2C_ACTION_SEND_ADDR_2 |
|
MV64XXX_I2C_ACTION_SEND_DATA |
|
MV64XXX_I2C_ACTION_RCV_DATA |
|
MV64XXX_I2C_ACTION_RCV_DATA_STOP |
|
MV64XXX_I2C_ACTION_SEND_STOP |
|
Definition at line 75 of file i2c-mv64xxx.c.
MODULE_DEVICE_TABLE |
( |
of |
, |
|
|
mv64xxx_i2c_of_match_table |
|
|
) |
| |
module_platform_driver |
( |
mv64xxx_i2c_driver |
| ) |
|