Anatolij Gustschin | 06b4501 | 2011-07-25 17:13:27 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Module: eeprom_93xx46 |
| 3 | * platform description for 93xx46 EEPROMs. |
| 4 | */ |
| 5 | |
Cory Tusar | 3ca9b1a | 2016-02-10 14:32:08 -0500 | [diff] [blame] | 6 | struct gpio_desc; |
| 7 | |
Anatolij Gustschin | 06b4501 | 2011-07-25 17:13:27 -0700 | [diff] [blame] | 8 | struct eeprom_93xx46_platform_data { |
| 9 | unsigned char flags; |
| 10 | #define EE_ADDR8 0x01 /* 8 bit addr. cfg */ |
| 11 | #define EE_ADDR16 0x02 /* 16 bit addr. cfg */ |
| 12 | #define EE_READONLY 0x08 /* forbid writing */ |
| 13 | |
Cory Tusar | e1379b5 | 2016-02-10 14:32:07 -0500 | [diff] [blame] | 14 | unsigned int quirks; |
| 15 | /* Single word read transfers only; no sequential read. */ |
| 16 | #define EEPROM_93XX46_QUIRK_SINGLE_WORD_READ (1 << 0) |
| 17 | /* Instructions such as EWEN are (addrlen + 2) in length. */ |
| 18 | #define EEPROM_93XX46_QUIRK_INSTRUCTION_LENGTH (1 << 1) |
| 19 | |
Anatolij Gustschin | 06b4501 | 2011-07-25 17:13:27 -0700 | [diff] [blame] | 20 | /* |
| 21 | * optional hooks to control additional logic |
| 22 | * before and after spi transfer. |
| 23 | */ |
| 24 | void (*prepare)(void *); |
| 25 | void (*finish)(void *); |
Cory Tusar | 3ca9b1a | 2016-02-10 14:32:08 -0500 | [diff] [blame] | 26 | struct gpio_desc *select; |
Anatolij Gustschin | 06b4501 | 2011-07-25 17:13:27 -0700 | [diff] [blame] | 27 | }; |