Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
at25.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/sched.h>
#include <linux/spi/spi.h>
#include <linux/spi/eeprom.h>
#include <linux/of.h>

Go to the source code of this file.

Data Structures

struct  at25_data
 

Macros

#define AT25_WREN   0x06 /* latch the write enable */
 
#define AT25_WRDI   0x04 /* reset the write enable */
 
#define AT25_RDSR   0x05 /* read status register */
 
#define AT25_WRSR   0x01 /* write status register */
 
#define AT25_READ   0x03 /* read byte(s) */
 
#define AT25_WRITE   0x02 /* write byte(s)/sector */
 
#define AT25_SR_nRDY   0x01 /* nRDY = write-in-progress */
 
#define AT25_SR_WEN   0x02 /* write enable (latched) */
 
#define AT25_SR_BP0   0x04 /* BP for software writeprotect */
 
#define AT25_SR_BP1   0x08
 
#define AT25_SR_WPEN   0x80 /* writeprotect enable */
 
#define AT25_INSTR_BIT3   0x08 /* Additional address bit in instr */
 
#define EE_MAXADDRLEN   3 /* 24 bit addresses, up to 2 MBytes */
 
#define EE_TIMEOUT   25
 
#define io_limit   PAGE_SIZE /* bytes */
 

Functions

 module_spi_driver (at25_driver)
 
 MODULE_DESCRIPTION ("Driver for most SPI EEPROMs")
 
 MODULE_AUTHOR ("David Brownell")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("spi:at25")
 

Macro Definition Documentation

#define AT25_INSTR_BIT3   0x08 /* Additional address bit in instr */

Definition at line 53 of file at25.c.

#define AT25_RDSR   0x05 /* read status register */

Definition at line 42 of file at25.c.

#define AT25_READ   0x03 /* read byte(s) */

Definition at line 44 of file at25.c.

#define AT25_SR_BP0   0x04 /* BP for software writeprotect */

Definition at line 49 of file at25.c.

#define AT25_SR_BP1   0x08

Definition at line 50 of file at25.c.

#define AT25_SR_nRDY   0x01 /* nRDY = write-in-progress */

Definition at line 47 of file at25.c.

#define AT25_SR_WEN   0x02 /* write enable (latched) */

Definition at line 48 of file at25.c.

#define AT25_SR_WPEN   0x80 /* writeprotect enable */

Definition at line 51 of file at25.c.

#define AT25_WRDI   0x04 /* reset the write enable */

Definition at line 41 of file at25.c.

#define AT25_WREN   0x06 /* latch the write enable */

Definition at line 40 of file at25.c.

#define AT25_WRITE   0x02 /* write byte(s)/sector */

Definition at line 45 of file at25.c.

#define AT25_WRSR   0x01 /* write status register */

Definition at line 43 of file at25.c.

#define EE_MAXADDRLEN   3 /* 24 bit addresses, up to 2 MBytes */

Definition at line 55 of file at25.c.

#define EE_TIMEOUT   25

Definition at line 60 of file at25.c.

#define io_limit   PAGE_SIZE /* bytes */

Definition at line 64 of file at25.c.

Function Documentation

MODULE_ALIAS ( "spi:at25"  )
MODULE_AUTHOR ( "David Brownell"  )
MODULE_DESCRIPTION ( "Driver for most SPI EEPROMs"  )
MODULE_LICENSE ( "GPL"  )
module_spi_driver ( at25_driver  )