From: Dimitri Fedrau <dima.fedrau@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "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>,
"Stefan Eichenberger" <eichest@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: marvell-88q2xxx: Fix temperature measurement with reset-gpios
Date: Fri, 17 Jan 2025 16:08:04 +0100 [thread overview]
Message-ID: <20250117150804.GA16023@debian> (raw)
In-Reply-To: <cf5ab51b-ca82-4a06-befd-7ed359c07fc2@lunn.ch>
Hi Andrew,
Am Fri, Jan 17, 2025 at 02:22:55PM +0100 schrieb Andrew Lunn:
> > 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.
Tested it, there haven't been any issues with enabling it again.
You are right, but I would need struct mv88q2xxx_priv anyway for patch:
https://lore.kernel.org/netdev/20250110-marvell-88q2xxx-leds-v1-1-22e7734941c2@gmail.com/
There I'm running into the same issue as here and have to fix it there
too. Then it makes sense to keep the priv->enable_temp. I just wanted to
fix this issue before I continue with the patch for LED driver.
By the way, I forgot to add the fixes tag:
Fixes: a557a92e6881 ("net: phy: marvell-88q2xxx: add support for temperature sensor")
Will add it in V2.
Best regards,
Dimitri
prev parent reply other threads:[~2025-01-17 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 15:37 [PATCH] net: phy: marvell-88q2xxx: Fix temperature measurement with reset-gpios Dimitri Fedrau
2025-01-17 10:19 ` Niklas Söderlund
2025-01-17 13:22 ` Andrew Lunn
2025-01-17 15:08 ` Dimitri Fedrau [this message]
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=20250117150804.GA16023@debian \
--to=dima.fedrau@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eichest@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).