diff options
| author | Svyatoslav Ryhel <[email protected]> | 2023-04-25 10:57:21 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-05-02 14:23:58 -0400 |
| commit | 8b215e10fe585907be8b6a0babad2923f6cf4da2 (patch) | |
| tree | 8b49a7d57a378831964589d015f57b242a7feeb2 /test | |
| parent | 5f650fa6ad5d31ef5d8c332be0991bd730f552d4 (diff) | |
test: Add tests for the extcon
Provide tests to the simple extcon device.
Signed-off-by: Svyatoslav Ryhel <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/dm/Makefile | 1 | ||||
| -rw-r--r-- | test/dm/extcon.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/dm/Makefile b/test/dm/Makefile index c8534b5cfa8..3799b1ae8fd 100644 --- a/test/dm/Makefile +++ b/test/dm/Makefile @@ -49,6 +49,7 @@ obj-$(CONFIG_DM_DSA) += dsa.o obj-$(CONFIG_ECDSA_VERIFY) += ecdsa.o obj-$(CONFIG_EFI_MEDIA_SANDBOX) += efi_media.o obj-$(CONFIG_DM_ETH) += eth.o +obj-$(CONFIG_EXTCON) += extcon.o ifneq ($(CONFIG_EFI_PARTITION),) obj-$(CONFIG_FASTBOOT_FLASH_MMC) += fastboot.o endif 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 <[email protected]> + */ + +#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); |
