summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2019-11-17 10:47:36 -0800
committerKever Yang <kever.yang@rock-chips.com>2019-11-23 22:29:49 +0800
commite82692ab325088fe78beba727862c377ced0fc8b (patch)
tree8a1cf4cf6ba1484d18b87565abda4e0036188d95 /drivers/power
parentc9fca5ec8849b8fa16b16cece091645e7d3aa02b (diff)
downloadu-boot-e82692ab325088fe78beba727862c377ced0fc8b.tar.gz
power: fan53555: fix fan53555_regulator_set_value
fan53555_regulator_set_value() passes its own dev to pmic_clrsetbits() instead of its parent (pmic). As result u-boot crashes when you try to set voltage on fan53555 regulator Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/regulator/fan53555.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c
index 9c48b26216..24a9b67586 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -159,7 +159,7 @@ static int fan53555_regulator_set_value(struct udevice *dev, int uV)
debug("%s: uV=%d; writing volume %d: %02x\n",
__func__, uV, pdata->vol_reg, vol);
- return pmic_clrsetbits(dev, pdata->vol_reg, GENMASK(6, 0), vol);
+ return pmic_clrsetbits(dev->parent, pdata->vol_reg, GENMASK(6, 0), vol);
}
static int fan53555_voltages_setup(struct udevice *dev)