From 89f71ebb355c624320c2b0ace8ae9488ff53cbeb Mon Sep 17 00:00:00 2001
From: Birger Koblitz <mail@birger-koblitz.de>
Date: Tue, 5 Jan 2021 20:40:52 +0100
Subject: PHY: Add realtek PHY

This fixes the build problems for the REALTEK target by adding a proper
configuration option for the phy module.

Submitted-by: Birger Koblitz <mail@birger-koblitz.de>
--- a/drivers/net/phy/realtek/Makefile
+++ b/drivers/net/phy/realtek/Makefile
@@ -2,3 +2,4 @@
 realtek-y			+= realtek_main.o
 realtek-$(CONFIG_REALTEK_PHY_HWMON) += realtek_hwmon.o
 obj-$(CONFIG_REALTEK_PHY)	+= realtek.o
+obj-$(CONFIG_REALTEK_PHY_MULTIPORT) += realtek_multiport.o
--- a/drivers/net/phy/realtek/Kconfig
+++ b/drivers/net/phy/realtek/Kconfig
@@ -5,6 +5,13 @@ config REALTEK_PHY
 	help
 	  Currently supports RTL821x/RTL822x and fast ethernet PHYs
 
+config REALTEK_PHY_MULTIPORT
+	tristate "Realtek multiport PHYs"
+	depends on PHYLIB
+	select PHY_PACKAGE
+	help
+	  Currently supports RTL8214x/RTL8218x gigabit multiport PHYs
+
 if REALTEK_PHY
 
 config REALTEK_PHY_HWMON
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -105,7 +105,7 @@ obj-$(CONFIG_NXP_CBTX_PHY)	+= nxp-cbtx.o
 obj-$(CONFIG_NXP_TJA11XX_PHY)	+= nxp-tja11xx.o
 obj-y				+= qcom/
 obj-$(CONFIG_QSEMI_PHY)		+= qsemi.o
-obj-$(CONFIG_REALTEK_PHY)	+= realtek/
+obj-y				+= realtek/
 obj-y				+= rtl8261n/
 obj-$(CONFIG_RENESAS_PHY)	+= uPD60620.o
 obj-$(CONFIG_ROCKCHIP_PHY)	+= rockchip.o
