diff options
Diffstat (limited to 'drivers/power/pmic/pmic-uclass.c')
-rw-r--r-- | drivers/power/pmic/pmic-uclass.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c index 8b19998136..7211026aec 100644 --- a/drivers/power/pmic/pmic-uclass.c +++ b/drivers/power/pmic/pmic-uclass.c @@ -133,8 +133,9 @@ int pmic_reg_read(struct udevice *dev, uint reg) u8 byte; int ret; + debug("%s: reg=%x", __func__, reg); ret = pmic_read(dev, reg, &byte, 1); - debug("%s: reg=%x, value=%x\n", __func__, reg, byte); + debug(", value=%x, ret=%d\n", byte, ret); return ret ? ret : byte; } @@ -142,9 +143,13 @@ int pmic_reg_read(struct udevice *dev, uint reg) int pmic_reg_write(struct udevice *dev, uint reg, uint value) { u8 byte = value; + int ret; + + debug("%s: reg=%x, value=%x", __func__, reg, value); + ret = pmic_write(dev, reg, &byte, 1); + debug(", ret=%d\n", ret); - debug("%s: reg=%x, value=%x\n", __func__, reg, value); - return pmic_write(dev, reg, &byte, 1); + return ret; } int pmic_clrsetbits(struct udevice *dev, uint reg, uint clr, uint set) |