summaryrefslogtreecommitdiff
path: root/test/dm/bootcount.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2020-05-28 11:48:55 +0200
committerMichal Simek <michal.simek@xilinx.com>2020-08-20 09:49:20 +0200
commitf692b479f02d9b2689b0686f1f6ff2f06c6ecc59 (patch)
tree1501c8e1fb5f34a4f7163fc059a6ba1a290bd4f2 /test/dm/bootcount.c
parent2d06361a11e88e6ca5bbd11e3ed5717d7715bfe1 (diff)
i2c: eeprom: Use reg property instead of offset and size
Remove adhoc dt binding for fixed-partition definition for i2c eeprom. fixed-partition are using reg property instead of offset/size pair. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm/bootcount.c')
-rw-r--r--test/dm/bootcount.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/dm/bootcount.c b/test/dm/bootcount.c
index f911984698..e0c47b5d7a 100644
--- a/test/dm/bootcount.c
+++ b/test/dm/bootcount.c
@@ -25,6 +25,14 @@ static int dm_test_bootcount(struct unit_test_state *uts)
ut_assertok(dm_bootcount_get(dev, &val));
ut_assert(val == 0xab);
+ ut_assertok(uclass_get_device(UCLASS_BOOTCOUNT, 1, &dev));
+ ut_assertok(dm_bootcount_set(dev, 0));
+ ut_assertok(dm_bootcount_get(dev, &val));
+ ut_assert(val == 0);
+ ut_assertok(dm_bootcount_set(dev, 0xab));
+ ut_assertok(dm_bootcount_get(dev, &val));
+ ut_assert(val == 0xab);
+
return 0;
}