Commit 65f89be2 authored by John Keeping's avatar John Keeping Committed by Simon Glass
Browse files

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: default avatarJohn Keeping <john@metanate.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 6e06acb7
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment