summaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2015-02-13 13:11:09 -0500
committerTom Rini <trini@ti.com>2015-02-13 13:11:09 -0500
commit757566d1567a98f5c331c14f088001dbfe187191 (patch)
tree86c9ab53fbefee672f37165f51db398338bf9968 /test/dm
parentc445506d73a0fba6472d12510b2d41148f078349 (diff)
parentb1f6659c420dae9cd06514fbd8342f39b3f326b9 (diff)
downloadu-boot-imx-757566d1567a98f5c331c14f088001dbfe187191.zip
u-boot-imx-757566d1567a98f5c331c14f088001dbfe187191.tar.gz
u-boot-imx-757566d1567a98f5c331c14f088001dbfe187191.tar.bz2
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/Kconfig8
-rw-r--r--test/dm/i2c.c6
2 files changed, 11 insertions, 3 deletions
diff --git a/test/dm/Kconfig b/test/dm/Kconfig
new file mode 100644
index 0000000..a9d0298
--- /dev/null
+++ b/test/dm/Kconfig
@@ -0,0 +1,8 @@
+config DM_TEST
+ bool "Enable driver model test command"
+ depends on SANDBOX && CMD_DM
+ help
+ This enables the 'dm test' command which runs a series of unit
+ tests on the driver model code. Each subsystem (uclass) is tested.
+ If all is well then all tests pass although there will be a few
+ messages printed along the way.
diff --git a/test/dm/i2c.c b/test/dm/i2c.c
index ef88372..541b73b 100644
--- a/test/dm/i2c.c
+++ b/test/dm/i2c.c
@@ -67,10 +67,10 @@ static int dm_test_i2c_speed(struct dm_test_state *dms)
ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
ut_assertok(i2c_get_chip(bus, chip, 1, &dev));
- ut_assertok(i2c_set_bus_speed(bus, 100000));
+ ut_assertok(dm_i2c_set_bus_speed(bus, 100000));
ut_assertok(dm_i2c_read(dev, 0, buf, 5));
- ut_assertok(i2c_set_bus_speed(bus, 400000));
- ut_asserteq(400000, i2c_get_bus_speed(bus));
+ ut_assertok(dm_i2c_set_bus_speed(bus, 400000));
+ ut_asserteq(400000, dm_i2c_get_bus_speed(bus));
ut_assertok(dm_i2c_read(dev, 0, buf, 5));
ut_asserteq(-EINVAL, dm_i2c_write(dev, 0, buf, 5));