From: Manorit Chawdhry Date: Tue, 15 Oct 2024 10:52:18 +0000 (+0530) Subject: drivers: misc: k3_avs: Check return code while programming AVS X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=c530cd4fa1356dee96047e8e605a20348f6d2eaa;p=u-boot.git drivers: misc: k3_avs: Check return code while programming AVS Check if AVS could not be programmed and print a warning. Fixes: 9d233b4e3ed6 ("misc: k3_avs: add driver for K3 Adaptive Voltage Scaling Class 0") Reviewed-by: Udit Kumar Signed-off-by: Manorit Chawdhry Reviewed-by: Aniket Limaye --- diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c index 87471cc3b1..66ad747f2d 100644 --- a/drivers/misc/k3_avs.c +++ b/drivers/misc/k3_avs.c @@ -391,7 +391,10 @@ static int k3_avs_probe(struct udevice *dev) if (vd->flags & VD_FLAG_INIT_DONE) continue; - k3_avs_program_voltage(priv, vd, vd->opp); + ret = k3_avs_program_voltage(priv, vd, vd->opp); + if (ret) + dev_warn(dev, "Could not program AVS voltage for VD%d, vd->opp=%d, ret=%d\n", + vd->id, vd->opp, ret); } if (!device_is_compatible(priv->dev, "ti,am654-avs"))