blob: 7a864eb0fb377e32a54b2a90c5420c8d72a3b910 [file] [log] [blame]
Simon Glass217293e2020-10-25 20:38:29 -06001// SPDX-License-Identifier: GPL-2.0+
2
3#include <common.h>
4#include <dm.h>
5#include <dm/test.h>
6#include <test/test.h>
7#include <test/ut.h>
8
9/* Test that we can find a device using of-platdata */
10static int dm_test_of_platdata_base(struct unit_test_state *uts)
11{
12 struct udevice *dev;
13
14 ut_assertok(uclass_first_device_err(UCLASS_SERIAL, &dev));
15 ut_asserteq_str("sandbox_serial", dev->name);
16
17 return 0;
18}
19DM_TEST(dm_test_of_platdata_base, UT_TESTF_SCAN_PDATA);