Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/5] net: dsa: mt7530: disable regulators on teardown and setup failure
@ 2026-12-03  6:48 Haoran Wang
  2026-12-03  6:48 ` [PATCH net-next v2 4/5] net: dsa: mt7530: disable regulators on " Haoran Wang
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Haoran Wang @ 2026-12-03  6:48 UTC (permalink / raw)
  To: Chester A. Unal, Daniel Golle, Andrew Lunn, Vladimir Oltean
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Matthias Brugger, AngeloGioacchino Del Regno, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

This series fixes MT7530 regulator handling: the core and io regulators
are enabled in mt7530_setup() but were left enabled when the switch is
torn down without the driver being unbound, or when a setup step fails.
It also moves the GPIO controller registration after the FDB flush and
factors out the regulator disable into a helper that is reused on the
error paths.

Changes in v2:
- Target net-next instead of net: the issues are edge cases rather than
  regressions reported in the field.
- Keep the regulator_disable() error reporting in the helper (Andrew).
- Add a sw_teardown() callback symmetric with sw_setup() and use it from
  mt753x_teardown() and the mt753x_setup() error path (Andrew).
- Fix the Fixes tag on the last patch: the mt753x_setup() failure paths
  were added by commit ba751e28d442 ("net: dsa: mt7530: add interrupt
  support").
- Add Andrew's Reviewed-by.

Haoran Wang (5):
  net: dsa: mt7530: disable regulators on switch teardown
  net: dsa: mt7530: factor out mt7530_disable_pwrs()
  net: dsa: mt7530: register the GPIO controller last in setup
  net: dsa: mt7530: disable regulators on setup failure
  net: dsa: mt7530: disable regulators on mt753x_setup() failure

 drivers/net/dsa/mt7530-mdio.c | 14 +-----
 drivers/net/dsa/mt7530.c      | 81 ++++++++++++++++++++++++++++-------
 drivers/net/dsa/mt7530.h      |  2 +
 3 files changed, 68 insertions(+), 29 deletions(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-12-03  6:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  6:48 [PATCH net-next v2 0/5] net: dsa: mt7530: disable regulators on teardown and setup failure Haoran Wang
2026-12-03  6:48 ` [PATCH net-next v2 4/5] net: dsa: mt7530: disable regulators on " Haoran Wang
2026-12-03  6:48 ` [PATCH net-next v2 1/5] net: dsa: mt7530: disable regulators on switch teardown Haoran Wang
2026-12-03  6:48 ` [PATCH net-next v2 3/5] net: dsa: mt7530: register the GPIO controller last in setup Haoran Wang
2026-12-03  6:48 ` [PATCH net-next v2 2/5] net: dsa: mt7530: factor out mt7530_disable_pwrs() Haoran Wang
2026-12-03  6:48 ` [PATCH net-next v2 5/5] net: dsa: mt7530: disable regulators on mt753x_setup() failure Haoran Wang
2026-12-03  6:53 ` [PATCH net-next v2 0/5] net: dsa: mt7530: disable regulators on teardown and setup failure netdev-bot+sinfo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox