From: Simon Glass Date: Fri, 3 Jul 2015 00:16:03 +0000 (-0600) Subject: dm: pmic: Correct the pmic_reg_write() implementation X-Git-Tag: v2015.10-rc2~394^2~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd367d89979c0476e2fcbca445a49008b372872b;p=platform%2Fkernel%2Fu-boot.git dm: pmic: Correct the pmic_reg_write() implementation This should write the register, not read it. Fix this bug. Signed-off-by: Simon Glass Acked-by: Przemyslaw Marczak --- diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c index d99cb9a..49709f3 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)