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>
int reg = dev->driver_data;
int ret;
int reg = dev->driver_data;
int ret;
- ret = pmic_reg_read(dev->parent, reg);
+ ret = pmic_reg_read(dev->parent, addr_vol[reg]);
int reg = dev->driver_data;
int ret;
int reg = dev->driver_data;
int ret;
- ret = pmic_reg_read(dev->parent, reg);
+ ret = pmic_reg_read(dev->parent, addr_ctl[reg]);