Re: [PATCH net-next 3/3] net: phy: marvell-88q2xxx: enable temperature sensor in mv88q2xxx_config_init
From: Dimitri Fedrau
Date: Sat Feb 15 2025 - 02:14:14 EST
Am Fri, Feb 14, 2025 at 07:06:22PM +0100 schrieb Andrew Lunn:
> On Fri, Feb 14, 2025 at 05:32:05PM +0100, Dimitri Fedrau wrote:
> > Temperature sensor gets enabled for 88Q222X devices in
> > mv88q222x_config_init. Move enabling to mv88q2xxx_config_init because
> > all 88Q2XXX devices support the temperature sensor.
> >
> > Signed-off-by: Dimitri Fedrau <dima.fedrau@xxxxxxxxx>
>
> The change itself looks fine:
>
> Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
>
> but is the sensor actually usable if the PHY has not yet been
> configured?
>
No.
> Architecturally, it seems odd to register the HWMON in probe, and then
> enable it in config_init.
I think it makes sense to enable it in probe as well. I just moved it to
config_init because of the PHYs hard reset. Before
https://lore.kernel.org/netdev/20250118-marvell-88q2xxx-fix-hwmon-v2-1-402e62ba2dcb@xxxxxxxxx/
it was already done in mv88q2xxx_hwmon_probe. I will come up with a patch.
Best regards,
Dimitri Fedrau