u-boot-brain/test/dm
Przemyslaw Marczak e8f339e0e8 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>
2015-05-14 19:58:34 -06:00
..
.gitignore dm: Add basic tests 2014-03-04 12:15:29 -05:00
bus.c dm: test: bus: Use a local variable to simplify code 2015-04-18 11:11:19 -06:00
cmd_dm.c dm: test: Allow 'dm test' to select a particular test to run 2015-04-18 11:11:30 -06:00
core.c dm: test: Don't clear global_data in dm_test_uclass_before_ready() 2015-04-22 11:15:36 -06:00
eth.c test: dm: eth: Skip timeouts on ping tests 2015-05-05 20:58:18 -06:00
gpio.c dm: gpio: Add better functions to request GPIOs 2015-01-29 17:09:51 -07:00
i2c.c dm: i2c: Add an explicit test mode to the sandbox I2C driver 2015-05-05 20:58:19 -06:00
Kconfig dm: test: Add a Kconfig file 2015-02-12 10:35:34 -07:00
Makefile test: dm: add sandbox PMIC framework tests 2015-05-14 19:58:34 -06:00
pci.c dm: pci: Add driver model tests for PCI 2015-04-18 11:11:09 -06:00
pmic.c test: dm: add sandbox PMIC framework tests 2015-05-14 19:58:34 -06:00
regulator.c test: dm: add sandbox PMIC framework tests 2015-05-14 19:58:34 -06:00
rtc.c dm: rtc: Add tests for real-time clocks 2015-05-05 20:58:41 -06:00
sf.c sandbox: Correct ordering of 'sb save' commands 2015-01-14 11:35:43 -05:00
spi.c dm: spi: Move slave details to child platdata 2015-01-29 17:09:56 -07:00
test-dm.sh dm: usb: Add tests for the USB uclass 2015-04-18 11:11:30 -06:00
test-driver.c dm: Allow drivers to be marked 'before relocation' 2014-07-23 14:07:24 +01:00
test-fdt.c dm: core: Allow uclass to set up a device's child before it is probed 2015-01-29 17:09:56 -07:00
test-main.c dm: test: Allow 'dm test' to select a particular test to run 2015-04-18 11:11:30 -06:00
test-uclass.c dm: test: Add tests for device's uclass platform data 2015-04-22 11:03:14 -06:00
test.dts dm: rtc: Add tests for real-time clocks 2015-05-05 20:58:41 -06:00
usb.c dm: usb: Add tests for the USB uclass 2015-04-18 11:11:30 -06:00
ut.c dm: Add basic tests 2014-03-04 12:15:29 -05:00