diff options
author | Lukasz Majewski <lukma@denx.de> | 2018-05-15 17:26:42 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2018-05-18 09:27:26 +0300 |
commit | e4aab0e169a3533350c49dcd8fe84b209658b63d (patch) | |
tree | da422757e09d625cf25f48edb2982c244c9bfb06 /test/dm | |
parent | 7ddce7d7a6e1cfa09e0cf5df1d20e30ce28bfd95 (diff) | |
download | u-boot-e4aab0e169a3533350c49dcd8fe84b209658b63d.tar.xz |
sandbox: tests: Exclude common test code (pmic_get) in test/dm/pmic.c
The common code can be excluded to be reused by tests for other PMIC.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm')
-rw-r--r-- | test/dm/pmic.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/dm/pmic.c b/test/dm/pmic.c index b2061178fc..c24bd3b0a1 100644 --- a/test/dm/pmic.c +++ b/test/dm/pmic.c @@ -21,9 +21,9 @@ #include <test/ut.h> /* Test PMIC get method */ -static int dm_test_power_pmic_get(struct unit_test_state *uts) + +static inline int power_pmic_get(struct unit_test_state *uts, char *name) { - const char *name = "sandbox_pmic"; struct udevice *dev; ut_assertok(pmic_get(name, &dev)); @@ -34,6 +34,14 @@ static int dm_test_power_pmic_get(struct unit_test_state *uts) return 0; } + +/* Test PMIC get method */ +static int dm_test_power_pmic_get(struct unit_test_state *uts) +{ + power_pmic_get(uts, "sandbox_pmic"); + + return 0; +} DM_TEST(dm_test_power_pmic_get, DM_TESTF_SCAN_FDT); /* Test PMIC I/O */ |