]> www.infradead.org Git - users/hch/misc.git/commitdiff
net: phy: qcom: qca807x fix condition for DAC_DSP_BIAS_CURRENT
authorGeorge Moussalem <george.moussalem@outlook.com>
Wed, 19 Feb 2025 13:09:21 +0000 (14:09 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Feb 2025 21:19:35 +0000 (13:19 -0800)
While setting the DAC value, the wrong boolean value is evaluated to set
the DSP bias current. So let's correct the conditional statement and use
the right boolean value read from the DTS set in the priv.

Cc: stable@vger.kernel.org
Fixes: d1cb613efbd3 ("net: phy: qcom: add support for QCA807x PHY Family")
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250219130923.7216-1-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/qcom/qca807x.c

index 3279de857b47485dd795ddd5f9a066db7758673e..2ad8c2586d64343bb5074e4eacb8b114f8d9282d 100644 (file)
@@ -774,7 +774,7 @@ static int qca807x_config_init(struct phy_device *phydev)
        control_dac &= ~QCA807X_CONTROL_DAC_MASK;
        if (!priv->dac_full_amplitude)
                control_dac |= QCA807X_CONTROL_DAC_DSP_AMPLITUDE;
-       if (!priv->dac_full_amplitude)
+       if (!priv->dac_full_bias_current)
                control_dac |= QCA807X_CONTROL_DAC_DSP_BIAS_CURRENT;
        if (!priv->dac_disable_bias_current_tweak)
                control_dac |= QCA807X_CONTROL_DAC_BIAS_CURRENT_TWEAK;