#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/wait.h>
#include <asm/uaccess.h>
#include "i2c.h"
Go to the source code of this file.
! ! Implements an interface for i2c compatible eeproms to run under Linux. ! Supports 2k, 8k(?) and 16k. Uses adaptive timing adjustments by !
Johan.nosp@m..Ado.nosp@m.lfsso.nosp@m.n@ax.nosp@m.is.co.nosp@m.m ! ! Probing results: ! 8k or not is detected (
the assumes 2k or 16k) ! 2k or 16k detected using test reads and writes. ! !---------------------------------------------------------------------— ! HISTORY ! ! DATE NAME CHANGES ! -— -— ----— ! Aug 28 1999 Edgar Iglesias Initial Version ! Aug 31 1999 Edgar Iglesias Allow simultaneous users. ! Sep 03 1999 Edgar Iglesias Updated probe. ! Sep 03 1999 Edgar Iglesias Added bail-out stuff if we get interrupted ! in
the spin-lock. ! ! (c) 1999 Axis Communications AB, Lund, Sweden !
Definition at line 35 of file eeprom.c.
#define EEPROM_16KB (16 * 1024) |
#define EEPROM_2KB (2 * 1024) |
#define EEPROM_8KB (8 * 1024 - 1 ) /* Last byte has write protection bit */ |
#define EEPROM_MAJOR_NR 122 /* use a LOCAL/EXPERIMENTAL major for now */ |
#define EEPROM_MINOR_NR 0 |
#define EEPROM_RETRIES 10 |
#define EETEXT "Assuming" |
#define INITIAL_WRITEDELAY_US 4000 |
#define MAX_WRITEDELAY_US 10000 /* 10 ms according to spec for 2KB EEPROM */ |
Initial value:=
{
.llseek = eeprom_lseek,
.read = eeprom_read,
.write = eeprom_write,
.open = eeprom_open,
.release = eeprom_close
}
Definition at line 103 of file eeprom.c.