diff options
author | John Keeping <john@metanate.com> | 2016-08-07 12:55:39 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-08-12 09:23:12 -0600 |
commit | 65f89be2ef73c6605ffe08eb671c425603ec765a (patch) | |
tree | 6e8a56b35c17fc62ca14ffa2496543f9a50267f1 /drivers | |
parent | 6e06acb73248e32457064d8fe820cbc217c45f3f (diff) | |
download | u-boot-65f89be2ef73c6605ffe08eb671c425603ec765a.tar.gz u-boot-65f89be2ef73c6605ffe08eb671c425603ec765a.tar.xz u-boot-65f89be2ef73c6605ffe08eb671c425603ec765a.zip |
power: regulator: act8846: fix reading values
The voltage and control registers need to be looked up from the value in
driver_data. Adjust the get_value and get_enable functions to match the
corresponding set_* functions.
Signed-off-by: John Keeping <john@metanate.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/regulator/act8846.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/regulator/act8846.c b/drivers/power/regulator/act8846.c index 255f8b096e..d506165120 100644 --- a/drivers/power/regulator/act8846.c +++ b/drivers/power/regulator/act8846.c @@ -88,7 +88,7 @@ static int reg_get_value(struct udevice *dev) int reg = dev->driver_data; int ret; - ret = pmic_reg_read(dev->parent, reg); + ret = pmic_reg_read(dev->parent, addr_vol[reg]); if (ret < 0) return ret; @@ -120,7 +120,7 @@ static bool reg_get_enable(struct udevice *dev) int reg = dev->driver_data; int ret; - ret = pmic_reg_read(dev->parent, reg); + ret = pmic_reg_read(dev->parent, addr_ctl[reg]); if (ret < 0) return ret; |