[U-Boot] [PATCH V2 10/13] test: dm: add sandbox PMIC framework tests

Simon Glass sjg at chromium.org
Fri May 15 15:56:53 CEST 2015


On 13 May 2015 at 05:38, Przemyslaw Marczak <p.marczak at samsung.com> wrote:
> 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 at samsung.com>
> Acked-by: Simon Glass <sjg at chromium.org>
> Tested on sandbox:
> Tested-by: Simon Glass <sjg at chromium.org>
> ---
> Changes V2:
> - test: dm: split power.c into pmic.c and regulator.c
> - regulator tests: cleanup
> ---
>  include/power/sandbox_pmic.h |  33 +++++
>  test/dm/Makefile             |   2 +
>  test/dm/pmic.c               |  69 +++++++++
>  test/dm/regulator.c          | 325 +++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 429 insertions(+)
>  create mode 100644 test/dm/pmic.c
>  create mode 100644 test/dm/regulator.c

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list