Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
eeprom.c File Reference
#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.

Data Structures

struct  eeprom_type
 

Macros

#define D(x)
 
#define EEPROM_MAJOR_NR   122 /* use a LOCAL/EXPERIMENTAL major for now */
 
#define EEPROM_MINOR_NR   0
 
#define INITIAL_WRITEDELAY_US   4000
 
#define MAX_WRITEDELAY_US   10000 /* 10 ms according to spec for 2KB EEPROM */
 
#define EEPROM_RETRIES   10
 
#define EEPROM_2KB   (2 * 1024)
 
#define EEPROM_8KB   (8 * 1024 - 1 ) /* Last byte has write protection bit */
 
#define EEPROM_16KB   (16 * 1024)
 
#define i2c_delay(x)   udelay(x)
 
#define EETEXT   "Assuming"
 
#define DBP_SAVE(x)
 
#define ax_printf   printk
 

Functions

int __init eeprom_init (void)
 
 module_init (eeprom_init)
 

Variables

struct file_operations eeprom_fops
 

Macro Definition Documentation

#define ax_printf   printk

Definition at line 783 of file eeprom.c.

#define D (   x)

! ! 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 DBP_SAVE (   x)

Definition at line 782 of file eeprom.c.

#define EEPROM_16KB   (16 * 1024)

Definition at line 55 of file eeprom.c.

#define EEPROM_2KB   (2 * 1024)

Definition at line 52 of file eeprom.c.

#define EEPROM_8KB   (8 * 1024 - 1 ) /* Last byte has write protection bit */

Definition at line 54 of file eeprom.c.

#define EEPROM_MAJOR_NR   122 /* use a LOCAL/EXPERIMENTAL major for now */

Definition at line 40 of file eeprom.c.

#define EEPROM_MINOR_NR   0

Definition at line 41 of file eeprom.c.

#define EEPROM_RETRIES   10

Definition at line 50 of file eeprom.c.

#define EETEXT   "Assuming"
#define i2c_delay (   x)    udelay(x)

Definition at line 57 of file eeprom.c.

#define INITIAL_WRITEDELAY_US   4000

Definition at line 46 of file eeprom.c.

#define MAX_WRITEDELAY_US   10000 /* 10 ms according to spec for 2KB EEPROM */

Definition at line 47 of file eeprom.c.

Function Documentation

int __init eeprom_init ( void  )

Definition at line 114 of file eeprom.c.

module_init ( eeprom_init  )

Variable Documentation

struct file_operations eeprom_fops
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.