[PATCH 2/3] net: stmmac: restore pinctrl when driver remove.

Russell King (Oracle) linux at armlinux.org.uk
Wed Feb 18 00:55:11 PST 2026


On Wed, Feb 18, 2026 at 09:36:17AM +0100, Christophe Roullier wrote:
> when system suspend or unbind, need to set pins
> to low power state to save IO power consumption.
> 
> Signed-off-by: Christophe Roullier <christophe.roullier at foss.st.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 067b17f03cd09..3d4f0e4cb53fb 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -8071,6 +8071,9 @@ void stmmac_dvr_remove(struct device *dev)
>  	mutex_destroy(&priv->lock);
>  	bitmap_free(priv->af_xdp_zc_qps);
>  
> +	/* Select sleep pin state */
> +	pinctrl_pm_select_sleep_state(dev);
> +

I'm not convinced this is correct, there's nothing to match it in the
probe function, except what the driver model core does. However, the
driver model core also doesn't clean up the state if probe fails.

Adding LinusW for comment.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list