mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 10:50:53 +07:00
3ca9b1ac28
This commit adds support to the eeprom_93x46 driver allowing a GPIO line to function as a 'select' or 'enable' signal prior to accessing the EEPROM. Signed-off-by: Cory Tusar <cory.tusar@pid1solutions.com> Tested-by: Chris Healy <chris.healy@zii.aero> Reviewed-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28 lines
723 B
C
28 lines
723 B
C
/*
|
|
* Module: eeprom_93xx46
|
|
* platform description for 93xx46 EEPROMs.
|
|
*/
|
|
|
|
struct gpio_desc;
|
|
|
|
struct eeprom_93xx46_platform_data {
|
|
unsigned char flags;
|
|
#define EE_ADDR8 0x01 /* 8 bit addr. cfg */
|
|
#define EE_ADDR16 0x02 /* 16 bit addr. cfg */
|
|
#define EE_READONLY 0x08 /* forbid writing */
|
|
|
|
unsigned int quirks;
|
|
/* Single word read transfers only; no sequential read. */
|
|
#define EEPROM_93XX46_QUIRK_SINGLE_WORD_READ (1 << 0)
|
|
/* Instructions such as EWEN are (addrlen + 2) in length. */
|
|
#define EEPROM_93XX46_QUIRK_INSTRUCTION_LENGTH (1 << 1)
|
|
|
|
/*
|
|
* optional hooks to control additional logic
|
|
* before and after spi transfer.
|
|
*/
|
|
void (*prepare)(void *);
|
|
void (*finish)(void *);
|
|
struct gpio_desc *select;
|
|
};
|