summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-07-02 18:16:03 -0600
committerSimon Glass <sjg@chromium.org>2015-08-05 21:06:12 -0600
commitcd367d89979c0476e2fcbca445a49008b372872b (patch)
tree3b3ad5b3edfc6b2b3eb81dacbc8c9c6121b01b0a /drivers/power
parentb5ffa4fdcb656b8995d6800f9c10dad76a44d38b (diff)
dm: pmic: Correct the pmic_reg_write() implementation
This should write the register, not read it. Fix this bug. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/pmic/pmic-uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index d99cb9aada..49709f3084 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -142,7 +142,7 @@ int pmic_reg_write(struct udevice *dev, uint reg, uint value)
u8 byte = value;
debug("%s: reg=%x, value=%x\n", __func__, reg, value);
- return pmic_read(dev, reg, &byte, 1);
+ return pmic_write(dev, reg, &byte, 1);
}
int pmic_clrsetbits(struct udevice *dev, uint reg, uint clr, uint set)