]> git.baikalelectronics.ru Git - uboot.git/commit
pmic: allow dump command for non contiguous register maps
authorMartin Fuzzey <martin.fuzzey@flowbird.group>
Tue, 14 Jan 2020 15:56:18 +0000 (15:56 +0000)
committerTom Rini <trini@konsulko.com>
Tue, 28 Jan 2020 00:54:20 +0000 (19:54 -0500)
commitf46dfd5f1dfe9e77f60433b2512b6ed4280ffde2
tree8714a55ade4b47f4f80c15003cbfb5f5c50ca178
parent0eacf447f4b214759895967c81af41d86a986ae8
pmic: allow dump command for non contiguous register maps

Some PMICs (such as the DA9063) have non-contiguous register maps.
Attempting to read the non implemented registers returns an error
rather than a dummy value which causes 'pmic dump' to terminate
prematurely.

Fix this by allowing the PMIC driver to return -ENODATA for such
registers, which will then be displayed as '--' by pmic dump.

Use a single error code rather than any error code so that
we can distinguish between a hardware failure reading the PMIC
and a non implemented register known to the driver.

Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
cmd/pmic.c