diff options
| author | Heiko Stübner <[email protected]> | 2017-05-06 21:21:29 +0200 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2017-06-07 07:29:19 -0600 |
| commit | d1bf69d822724d427b23e289b0c2cf9275c1e99e (patch) | |
| tree | ed73348a673044d374a2b8e633fec21a2aceb798 /drivers | |
| parent | f8e3b083777844196ecd7b422ff3cfd2df904144 (diff) | |
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 <[email protected]>
Acked-by: Simon Glass <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/power/regulator/rk8xx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c index e655c2d91f5..c1ece96b66f 100644 --- a/drivers/power/regulator/rk8xx.c +++ b/drivers/power/regulator/rk8xx.c @@ -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]; } } |
