public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Eichenberger <eichest@gmail.com>
To: Dimitri Fedrau <dima.fedrau@gmail.com>
Cc: "Andrew Lunn" <andrew@lunn.ch>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Gregor Herburger" <gregor.herburger@ew.tq-group.com>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] net: phy: marvell-88q2xxx: Enable temperature measurement in probe again
Date: Wed, 19 Feb 2025 07:16:58 +0100	[thread overview]
Message-ID: <Z7V3Wsex1G7-zEYc@eichest-laptop> (raw)
In-Reply-To: <20250218-marvell-88q2xxx-hwmon-enable-at-probe-v1-1-999a304c8a11@gmail.com>

Hi Dimitri,

On Tue, Feb 18, 2025 at 07:33:09PM +0100, Dimitri Fedrau wrote:
> Enabling of the temperature sensor was moved from mv88q2xxx_hwmon_probe to
> mv88q222x_config_init with the consequence that the sensor is only
> usable when the PHY is configured. Enable the sensor in
> mv88q2xxx_hwmon_probe as well to fix this.
> 
> Fixes: a197004cf3c2 ("net: phy: marvell-88q2xxx: Fix temperature measurement with reset-gpios")
> Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
> ---
>  drivers/net/phy/marvell-88q2xxx.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/phy/marvell-88q2xxx.c b/drivers/net/phy/marvell-88q2xxx.c
> index a3996471a1c9a5d4060d5d19ce44aa70e902a83f..30d71bfc365597d77c34c48f05390db9d63c4af4 100644
> --- a/drivers/net/phy/marvell-88q2xxx.c
> +++ b/drivers/net/phy/marvell-88q2xxx.c
> @@ -718,6 +718,13 @@ static int mv88q2xxx_hwmon_probe(struct phy_device *phydev)
>  	struct device *dev = &phydev->mdio.dev;
>  	struct device *hwmon;
>  	char *hwmon_name;
> +	int ret;
> +
> +	/* Enable temperature sense */
> +	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;
>  
>  	priv->enable_temp = true;
>  	hwmon_name = devm_hwmon_sanitize_name(dev, dev_name(dev));

Is it necessary to have it enabled in probe and in config? Is that
because of the soft reset? Can it happen that the phy is reset but
config is not called, then we would end up in the same situation right?

Regards,
Stefan

  reply	other threads:[~2025-02-19  6:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 18:33 [PATCH 0/2] net: phy: marvell-88q2xxx: Enable temperature measurement in probe again Dimitri Fedrau
2025-02-18 18:33 ` [PATCH 1/2] " Dimitri Fedrau
2025-02-19  6:16   ` Stefan Eichenberger [this message]
2025-02-19 10:46     ` Dimitri Fedrau
2025-02-19 17:25       ` Stefan Eichenberger
2025-02-20  5:32         ` Dimitri Fedrau
2025-02-18 18:33 ` [PATCH 2/2] net: phy: marvell-88q2xxx: Prevent reading temperature with asserted reset Dimitri Fedrau
2025-02-19  6:29   ` Stefan Eichenberger
2025-02-19 10:54     ` Dimitri Fedrau
2025-02-19 17:28       ` Stefan Eichenberger
2025-02-19 13:21   ` Andrew Lunn
2025-02-20  5:40     ` Dimitri Fedrau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z7V3Wsex1G7-zEYc@eichest-laptop \
    --to=eichest@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dima.fedrau@gmail.com \
    --cc=edumazet@google.com \
    --cc=geert@linux-m68k.org \
    --cc=gregor.herburger@ew.tq-group.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox