diff options
author | Przemyslaw Marczak <p.marczak@samsung.com> | 2015-05-13 13:38:33 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-05-14 19:58:34 -0600 |
commit | e8f339e0e8bb15ba6e4079d0a239ddc211a02935 (patch) | |
tree | 4fdd151e07a51987f7a629cd9abe18a38a28dec4 /test/dm/Makefile | |
parent | 5d387d0df9816cdf05d7bce3b7379057068a7e58 (diff) |
test: dm: add sandbox PMIC framework tests
This change adds new file to sandbox driver model test environment.
The file is: test/dm/power.c, and it includes tests for PMIC framework,
which includes PMIC uclass and REGULATOR uclass.
All tests are based od Sandbox PMIC emulated device. Some test constants for
this device are defined in the header: include/power/sandbox_pmic.h
PMIC tests includes:
- pmic get - tests, that pmic_get() returns the requested device
- pmic I/O - tests I/O by writing and reading some values to PMIC's registers
and then compares, that the write/read values are equal.
The regulator tests includes:
- Regulator get by devname/platname
- Voltage set/get
- Current set/get
- Enable set/get
- Mode set/get
- Autoset
- List autoset
For the regulator 'get' test, the returned device pointers are compared,
and their names are also compared to the requested one.
Every other test, first sets the given attribute and next try to get it.
The test pass, when the set/get values are equal.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested on sandbox:
Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm/Makefile')
-rw-r--r-- | test/dm/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/dm/Makefile b/test/dm/Makefile index a0cc2c6de5..c7087bbfba 100644 --- a/test/dm/Makefile +++ b/test/dm/Makefile @@ -25,4 +25,6 @@ obj-$(CONFIG_DM_RTC) += rtc.o obj-$(CONFIG_DM_SPI_FLASH) += sf.o obj-$(CONFIG_DM_SPI) += spi.o obj-$(CONFIG_DM_USB) += usb.o +obj-$(CONFIG_DM_PMIC) += pmic.o +obj-$(CONFIG_DM_REGULATOR) += regulator.o endif |