Re: [PATCH] net: phy: marvell-88q2xxx: Fix temperature measurement with reset-gpios
From: Andrew Lunn
Date: Fri Jan 17 2025 - 08:23:36 EST
> static int mv88q222x_config_init(struct phy_device *phydev)
> {
> + struct mv88q2xxx_priv *priv = phydev->priv;
> + int ret;
> +
> + /* Enable temperature sense */
> + if (priv->enable_temp) {
> + ret = phy_modify_mmd(phydev, MDIO_MMD_PCS,
> + MDIO_MMD_PCS_MV_TEMP_SENSOR2,
> + MDIO_MMD_PCS_MV_TEMP_SENSOR2_DIS_MASK, 0);
> + if (ret < 0)
> + return ret;
> + }
Does enabling the sensor when it is already enabled cause issues? I'm
not sure if it is worth having priv->enable_temp just to save one
write which is going to be performed very infrequently.
Andrew