dm: i2c: EEPROM simulator allow tests visibility of addr and offset
authorRobert Beckett <bob.beckett@collabora.com>
Mon, 28 Oct 2019 17:44:58 +0000 (17:44 +0000)
committerHeiko Schocher <hs@denx.de>
Tue, 17 Dec 2019 05:57:22 +0000 (06:57 +0100)
commit22e93511be2e012d3f807641b07e09b649a71ef6
treedf80b24f773abc32a670dc241c4d044d5c83ed6f
parent85968522b928e19a27aa79f0cb186c80b8b82e47
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>
arch/sandbox/include/asm/test.h
drivers/misc/i2c_eeprom_emul.c
test/dm/i2c.c