1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 19:05:51 +01:00

dm: i2c: EEPROM simulator allow tests visibility of addr and offset

Improve i2c EEPROM simulator testing by providing access functions to
check the previous chip addr and offset.

Given that we can now directly test the offsets, also simplified the
offset mapping and allow for wrapping acceses.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
Robert Beckett
2019-10-28 17:44:58 +00:00
committed by Heiko Schocher
parent 85968522b9
commit 22e93511be
3 changed files with 86 additions and 29 deletions

View File

@@ -72,6 +72,10 @@ void sandbox_i2c_eeprom_set_test_mode(struct udevice *dev,
void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len);
uint sanbox_i2c_eeprom_get_prev_addr(struct udevice *dev);
uint sanbox_i2c_eeprom_get_prev_offset(struct udevice *dev);
/**
* sandbox_i2c_rtc_set_offset() - set the time offset from system/base time
*