mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-16 16:23:33 +08:00
power: rk808: fix ldo register offset
Till now get_ldo_reg did a return &rk808_ldo[num - 1]; to return the ldo register offset but didn't take into account that its calling functions already created the ldo as ldo = dev->driver_data - 1. This resulted in the setting for ldo8 writing to the register of ldo7 and so on. So fix this and get the correct ldo register data. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
f8e3b08377
commit
d1bf69d822
@ -92,9 +92,9 @@ static const struct rk8xx_reg_info *get_ldo_reg(struct udevice *pmic,
|
||||
struct rk8xx_priv *priv = dev_get_priv(pmic);
|
||||
switch (priv->variant) {
|
||||
case RK818_ID:
|
||||
return &rk818_ldo[num - 1];
|
||||
return &rk818_ldo[num];
|
||||
default:
|
||||
return &rk808_ldo[num - 1];
|
||||
return &rk808_ldo[num];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user