drivers: eeprom: Add support for eeprom simulator

Add support for a eeprom simulator. The PR limits the addition to
qemu_x86 but it can easily be added to other devices by defining the
eeprom simulator in the dts and setting 'CONFIG_EEPROM_SIMULATOR=y'

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Laczen JMS 2019-11-08 11:27:32 +01:00 committed by Johan Hedberg
commit 20623dfa4c
7 changed files with 268 additions and 2 deletions

View file

@ -21,6 +21,7 @@
aliases {
uart-0 = &uart0;
uart-1 = &uart1;
eeprom-0 = &eeprom0;
};
chosen {
@ -61,6 +62,13 @@
write-block-size = <4>;
};
};
eeprom0: eeprom {
status = "okay";
compatible = "zephyr,sim-eeprom";
label = "EEPROM_0";
size = <DT_SIZE_K(32)>;
};
};
&uart0 {