yt921x is already the longest single-file DSA driver, so it's time to split it into parts. Signed-off-by: David Yang --- MAINTAINERS | 2 +- drivers/net/dsa/Kconfig | 10 ++-------- drivers/net/dsa/Makefile | 2 +- drivers/net/dsa/motorcomm/Kconfig | 8 ++++++++ drivers/net/dsa/motorcomm/Makefile | 3 +++ drivers/net/dsa/{yt921x.c => motorcomm/chip.c} | 2 +- drivers/net/dsa/{yt921x.h => motorcomm/chip.h} | 0 7 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 drivers/net/dsa/motorcomm/Kconfig create mode 100644 drivers/net/dsa/motorcomm/Makefile rename drivers/net/dsa/{yt921x.c => motorcomm/chip.c} (99%) rename drivers/net/dsa/{yt921x.h => motorcomm/chip.h} (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 06df1171f4cf..b007f20b2763 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18039,7 +18039,7 @@ M: David Yang L: netdev@vger.kernel.org S: Maintained F: Documentation/devicetree/bindings/net/dsa/motorcomm,yt921x.yaml -F: drivers/net/dsa/yt921x.* +F: drivers/net/dsa/motorcomm/ F: net/dsa/tag_yt921x.c MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig index 4ab567c5bbaf..98e9bbe47de7 100644 --- a/drivers/net/dsa/Kconfig +++ b/drivers/net/dsa/Kconfig @@ -72,6 +72,8 @@ config NET_DSA_MV88E6060 source "drivers/net/dsa/microchip/Kconfig" +source "drivers/net/dsa/motorcomm/Kconfig" + source "drivers/net/dsa/mv88e6xxx/Kconfig" source "drivers/net/dsa/mxl862xx/Kconfig" @@ -158,12 +160,4 @@ config NET_DSA_VITESSE_VSC73XX_PLATFORM This enables support for the Vitesse VSC7385, VSC7388, VSC7395 and VSC7398 SparX integrated ethernet switches, connected over a CPU-attached address bus and work in memory-mapped I/O mode. - -config NET_DSA_YT921X - tristate "Motorcomm YT9215 ethernet switch chip support" - select NET_DSA_TAG_YT921X - select NET_IEEE8021Q_HELPERS if DCB - help - This enables support for the Motorcomm YT9215 ethernet switch - chip. endmenu diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile index d2975badffc0..138225baa4d5 100644 --- a/drivers/net/dsa/Makefile +++ b/drivers/net/dsa/Makefile @@ -14,11 +14,11 @@ obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX) += vitesse-vsc73xx-core.o obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM) += vitesse-vsc73xx-platform.o obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_SPI) += vitesse-vsc73xx-spi.o -obj-$(CONFIG_NET_DSA_YT921X) += yt921x.o obj-y += b53/ obj-y += hirschmann/ obj-y += lantiq/ obj-y += microchip/ +obj-y += motorcomm/ obj-y += mv88e6xxx/ obj-y += mxl862xx/ obj-y += netc/ diff --git a/drivers/net/dsa/motorcomm/Kconfig b/drivers/net/dsa/motorcomm/Kconfig new file mode 100644 index 000000000000..1fddd386f866 --- /dev/null +++ b/drivers/net/dsa/motorcomm/Kconfig @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: ISC +config NET_DSA_YT921X + tristate "Motorcomm YT9215 ethernet switch chip support" + select NET_DSA_TAG_YT921X + select NET_IEEE8021Q_HELPERS if DCB + help + This enables support for the Motorcomm YT9215 ethernet switch + chip. diff --git a/drivers/net/dsa/motorcomm/Makefile b/drivers/net/dsa/motorcomm/Makefile new file mode 100644 index 000000000000..afd03be9fa35 --- /dev/null +++ b/drivers/net/dsa/motorcomm/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: ISC +obj-$(CONFIG_NET_DSA_YT921X) += yt921x.o +yt921x-objs := chip.o diff --git a/drivers/net/dsa/yt921x.c b/drivers/net/dsa/motorcomm/chip.c similarity index 99% rename from drivers/net/dsa/yt921x.c rename to drivers/net/dsa/motorcomm/chip.c index 159b16606f6c..f070732845eb 100644 --- a/drivers/net/dsa/yt921x.c +++ b/drivers/net/dsa/motorcomm/chip.c @@ -26,7 +26,7 @@ #include #include -#include "yt921x.h" +#include "chip.h" struct yt921x_mib_desc { unsigned int size; diff --git a/drivers/net/dsa/yt921x.h b/drivers/net/dsa/motorcomm/chip.h similarity index 100% rename from drivers/net/dsa/yt921x.h rename to drivers/net/dsa/motorcomm/chip.h -- 2.53.0