aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/pmic.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmd/pmic.c b/cmd/pmic.c
index e46d813a70b..2400bfb601d 100644
--- a/cmd/pmic.c
+++ b/cmd/pmic.c
@@ -95,7 +95,7 @@ static int do_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
for (reg = 0; reg < pmic_reg_count(dev); reg++) {
ret = pmic_reg_read(dev, reg);
- if (ret < 0) {
+ if (ret < 0 && ret != -ENODATA) {
printf("Can't read register: %d\n", reg);
return failure(ret);
}
@@ -103,7 +103,15 @@ static int do_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (!(reg % 16))
printf("\n0x%02x: ", reg);
- printf(fmt, ret);
+ if (ret == -ENODATA) {
+ int i;
+
+ for (i = 0; i < priv->trans_len; i++)
+ puts("--");
+ puts(" ");
+ } else {
+ printf(fmt, ret);
+ }
}
printf("\n");