Re: [RFC PATCH net-next v2 1/2] net: dsa: mt7530: split-off MDIO driver

From: Andrew Lunn
Date: Tue Mar 28 2023 - 18:35:21 EST


On Tue, Mar 28, 2023 at 11:16:51PM +0100, Daniel Golle wrote:
> In order to support the built-in switch of some MediaTek SoCs we need
> to use MMIO instead of MDIO to access the switch.
> Prepare this be splitting-off the part of the driver registering an
> MDIO driver, so we can add another module acting as MMIO/platform driver.
>
> Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>

Hi Daniel

This is getting better.

Please try to split this patch up. Ideally you want lots of small
patches which are obviously correct. So maybe refactor the creation of
the PCS as a patch. Move p5_intf_modes() as a patch, etc.

Also, look at mt7530_probe() and mt7988_probe() side by side and see
what is common and can be put into one shared function in the
core. Same for remove. It could be that creating that helper is a
patch done before adding mt7530-mdio.c.

Andrew