mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
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>
This commit is contained in:
parent
7ddce7d7a6
commit
e4aab0e169
1 changed files with 10 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue