All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] power: fan53555: fix fan53555_regulator_set_value
@ 2019-11-17 18:47 Vasily Khoruzhick
  2019-11-20  7:10 ` Kever Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Vasily Khoruzhick @ 2019-11-17 18:47 UTC (permalink / raw)
  To: u-boot

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>
---
 drivers/power/regulator/fan53555.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] power: fan53555: fix fan53555_regulator_set_value
  2019-11-17 18:47 [U-Boot] [PATCH] power: fan53555: fix fan53555_regulator_set_value Vasily Khoruzhick
@ 2019-11-20  7:10 ` Kever Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Kever Yang @ 2019-11-20  7:10 UTC (permalink / raw)
  To: u-boot


On 2019/11/18 上午2:47, Vasily Khoruzhick wrote:
> 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>

Thanks,
- Kever
> ---
>   drivers/power/regulator/fan53555.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-20  7:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-17 18:47 [U-Boot] [PATCH] power: fan53555: fix fan53555_regulator_set_value Vasily Khoruzhick
2019-11-20  7:10 ` Kever Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.