PageRenderTime 14ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/include/linux/spi/eeprom.h

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35
C++ Header | 28 lines | 16 code | 4 blank | 8 comment | 0 complexity | d7c76c512e0ca3573d57a2333ac35f78 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 1#ifndef __LINUX_SPI_EEPROM_H
 2#define __LINUX_SPI_EEPROM_H
 3
 4#include <linux/memory.h>
 5
 6/*
 7 * Put one of these structures in platform_data for SPI EEPROMS handled
 8 * by the "at25" driver.  On SPI, most EEPROMS understand the same core
 9 * command set.  If you need to support EEPROMs that don't yet fit, add
10 * flags to support those protocol options.  These values all come from
11 * the chip datasheets.
12 */
13struct spi_eeprom {
14	u32		byte_len;
15	char		name[10];
16	u16		page_size;		/* for writes */
17	u16		flags;
18#define	EE_ADDR1	0x0001			/*  8 bit addrs */
19#define	EE_ADDR2	0x0002			/* 16 bit addrs */
20#define	EE_ADDR3	0x0004			/* 24 bit addrs */
21#define	EE_READONLY	0x0008			/* disallow writes */
22
23	/* for exporting this chip's data to other kernel code */
24	void (*setup)(struct memory_accessor *mem, void *context);
25	void *context;
26};
27
28#endif /* __LINUX_SPI_EEPROM_H */