aboutsummaryrefslogtreecommitdiff
path: root/test/dm/extcon.c
diff options
context:
space:
mode:
authorSvyatoslav Ryhel2023-04-25 10:57:21 +0300
committerTom Rini2023-05-02 14:23:58 -0400
commit8b215e10fe585907be8b6a0babad2923f6cf4da2 (patch)
tree8b49a7d57a378831964589d015f57b242a7feeb2 /test/dm/extcon.c
parent5f650fa6ad5d31ef5d8c332be0991bd730f552d4 (diff)
test: Add tests for the extcon
Provide tests to the simple extcon device. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm/extcon.c')
-rw-r--r--test/dm/extcon.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/dm/extcon.c b/test/dm/extcon.c
new file mode 100644
index 00000000000..6a4e22bfdc5
--- /dev/null
+++ b/test/dm/extcon.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2023 Svyatoslav Ryhel <clamor95@gmail.com>
+ */
+
+#include <dm.h>
+#include <dm/test.h>
+#include <extcon.h>
+#include <test/test.h>
+#include <test/ut.h>
+
+static int dm_test_extcon(struct unit_test_state *uts)
+{
+ struct udevice *dev;
+
+ ut_assertok(uclass_get_device_by_name(UCLASS_EXTCON, "extcon", &dev));
+
+ return 0;
+}
+
+DM_TEST(dm_test_extcon, UT_TESTF_SCAN_FDT);