#include <linux/module.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/init.h>
#include <asm/etraxi2c.h>
#include <arch/svinto.h>
#include <asm/io.h>
#include <asm/delay.h>
#include <arch/io_interface_mux.h>
#include "i2c.h"
Go to the source code of this file.
#define CLOCK_HIGH_TIME 8 |
Definition at line 40 of file i2c.c.
Definition at line 39 of file i2c.c.
! ! FILE NAME : i2c.c ! ! DESCRIPTION: implements an interface for IIC/I2C, both directly from other ! kernel modules (i2c_writereg/readreg) and from userspace using ! ioctl()'s ! ! (C) Copyright 1999-2007 Axis Communications AB, LUND, SWEDEN ! !
Definition at line 34 of file i2c.c.
#define ENABLE_INPUT 0x00 |
Definition at line 44 of file i2c.c.
#define ENABLE_OUTPUT 0x01 |
Definition at line 43 of file i2c.c.
Value:
Definition at line 99 of file i2c.c.
Definition at line 45 of file i2c.c.
Definition at line 46 of file i2c.c.
Value:
~IO_MASK(R_PORT_PB_I2C, i2c_d)) |
IO_FIELD(R_PORT_PB_I2C, i2c_d, (
x))); \
Definition at line 104 of file i2c.c.
Definition at line 47 of file i2c.c.
Definition at line 48 of file i2c.c.
Value:
Definition at line 93 of file i2c.c.
Value:
Definition at line 90 of file i2c.c.
Definition at line 86 of file i2c.c.
Definition at line 85 of file i2c.c.
#define i2c_getbit |
( |
| ) |
(*R_PORT_PB_READ & 0x1) |
#define I2C_MAJOR 123 /* LOCAL/EXPERIMENTAL */ |
Definition at line 36 of file i2c.c.
#define START_CONDITION_HOLD_TIME 8 |
Definition at line 41 of file i2c.c.
#define STOP_CONDITION_HOLD_TIME 8 |
Definition at line 42 of file i2c.c.
unsigned char i2c_readreg |
( |
unsigned char |
theSlave, |
|
|
unsigned char |
theReg |
|
) |
| |
int i2c_writereg |
( |
unsigned char |
theSlave, |
|
|
unsigned char |
theReg, |
|
|
unsigned char |
theValue |
|
) |
| |
module_init |
( |
i2c_register |
| ) |
|