]> Gentwo Git Trees - linux/.git/commit
net: phy: realtek: eliminate priv->phycr1 variable
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 17 Nov 2025 23:40:32 +0000 (01:40 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Nov 2025 04:24:23 +0000 (20:24 -0800)
commitbb78b71faf60d11a15f07e3390fcfd31e5e523bb
treefb9f2fd9ef2fd99b91862665dd1af63eb521a13f
parente1a31c41bef678afe0d99b7f0dc3711a80c68447
net: phy: realtek: eliminate priv->phycr1 variable

Previous changes have replaced the machine-level priv->phycr2 with a
high-level priv->disable_clk_out. This created a discrepancy with
priv->phycr1 which is resolved here, for uniformity.

One advantage of this new implementation is that we don't read
priv->phycr1 in rtl821x_probe() if we're never going to modify it.

We never test the positive return code from phy_modify_mmd_changed(), so
we could just as well use phy_modify_mmd().

I took the ALDPS feature description from commit d90db36a9e74 ("net:
phy: realtek: add dt property to enable ALDPS mode") and transformed it
into a function comment - the feature is sufficiently non-obvious to
deserve that.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251117234033.345679-6-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/realtek/realtek_main.c