This series introduces an initial SPI EEPROM driver model uclass, analogous to the existing I2C EEPROM support, currently providing read-only access. Patch 2 adds a sandbox emulator and a test/dm test.
v4 addresses Simon Glass's review of v3: the emulator now frees its backing store in a remove() method, and sandbox_spi_emul_get() gets full kerneldoc. Patch 1 is unchanged. João Loureiro (2): spi: Introduce initial EEPROM driver mode support sandbox: spi: Add SPI EEPROM emulator and DM test MAINTAINERS | 8 ++ arch/sandbox/dts/test.dts | 13 ++- configs/sandbox_defconfig | 1 + drivers/misc/Kconfig | 6 ++ drivers/misc/Makefile | 2 + drivers/misc/spi_eeprom.c | 185 +++++++++++++++++++++++++++++++++ drivers/misc/spi_eeprom_emul.c | 128 +++++++++++++++++++++++ drivers/spi/sandbox_spi.c | 37 ++++++- include/dm/uclass-id.h | 1 + include/spi_eeprom.h | 91 ++++++++++++++++ test/dm/Makefile | 1 + test/dm/spi_eeprom.c | 45 ++++++++ 12 files changed, 516 insertions(+), 2 deletions(-) create mode 100644 drivers/misc/spi_eeprom.c create mode 100644 drivers/misc/spi_eeprom_emul.c create mode 100644 include/spi_eeprom.h create mode 100644 test/dm/spi_eeprom.c -- 2.54.0

